PHPackages                             makaronnik/amphp-rabbitmq-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. makaronnik/amphp-rabbitmq-manager

ActiveLibrary[Queues &amp; Workers](/categories/queues)

makaronnik/amphp-rabbitmq-manager
=================================

PHP (8.1) Async Manager for RabbitMQ connection and channels. Wrapper over PHPinnacle Ridge

v1.0.0(3y ago)6582MITPHPPHP &gt;=8.1

Since Jul 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/makaronnik/amphp-rabbitmq-manager)[ Packagist](https://packagist.org/packages/makaronnik/amphp-rabbitmq-manager)[ Docs](https://github.com/makaronnik/amphp-rabbitmq-manager)[ RSS](/packages/makaronnik-amphp-rabbitmq-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (13)Versions (2)Used By (0)

[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)[![Unit Testing & Code Lint](https://github.com/makaronnik/amphp-rabbitmq-manager/actions/workflows/main.yml/badge.svg)](https://github.com/makaronnik/amphp-rabbitmq-manager/actions/workflows/main.yml)[![Latest Release](https://camo.githubusercontent.com/c5e695009109286e3bd19c14250bc5fd5427605ef58308ab6ebf1b8f9a0bbe20/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d616b61726f6e6e696b2f616d7068702d7261626269746d712d6d616e61676572)](https://camo.githubusercontent.com/c5e695009109286e3bd19c14250bc5fd5427605ef58308ab6ebf1b8f9a0bbe20/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d616b61726f6e6e696b2f616d7068702d7261626269746d712d6d616e61676572)[![License](https://camo.githubusercontent.com/aef45ab20106445d54bc099149b4bfe1658bbd77cb7aefa2e7a9620e2fc29c78/687474703a2f2f706f7365722e707567782e6f72672f6d616b61726f6e6e696b2f616d7068702d7261626269746d712d6d616e616765722f6c6963656e7365)](https://packagist.org/packages/makaronnik/amphp-rabbitmq-manager)

[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine/)

Amphp RabbitMQ Manager
======================

[](#amphp-rabbitmq-manager)

PHP (8.1) Async Manager for RabbitMQ connection and channels, which is a wrapper over [PHPinnacle Ridge](https://github.com/phpinnacle/ridge) library, based on [Amp](https://amphp.org/)

Installation
------------

[](#installation)

This package can be installed as a [Composer](https://getcomposer.org/) dependency.

```
composer require makaronnik/amphp-rabbitmq-manager
```

Requirements
------------

[](#requirements)

- PHP 8.1+

What is this manager used for?
------------------------------

[](#what-is-this-manager-used-for)

1. To get the connected client (PHPinnacle\\Ridge\\Client). In case of unsuccessful connection (an exception occurs), it attempts to reconnect (the number of attempts is configured in the manager's constructor). When AsyncEvent is configured, an event is emitted that a connection has been made.
2. To get the active channel (PHPinnacle\\Ridge\\Channel) by its name. Before that, the manager verifies the connection and, if necessary, performs the connection process.
3. To handle an exceptional disconnect. With a logger configured and an exception passed, a log entry is made. When AsyncEvent is configured, an event is emitted that the connection is lost.

Basic Usage
-----------

[](#basic-usage)

```
