Download the PHP package makaronnik/amphp-rabbitmq-manager without Composer

On this page you can find all versions of the php package makaronnik/amphp-rabbitmq-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package amphp-rabbitmq-manager

StandWithUkraine Unit Testing & Code Lint Latest Release License

Stand With Ukraine

Amphp RabbitMQ Manager

PHP (8.1) Async Manager for RabbitMQ connection and channels, which is a wrapper over PHPinnacle Ridge library, based on Amp

Installation

This package can be installed as a Composer dependency.

Requirements

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

Use case

If you run your application in a containerized environment (eg Docker Compose), in most cases your application will start much faster than the RabbitMQ container is ready to go. This will throw an exception in your application when trying to create a connected client. You will need to catch this exception yourself and attempt to reconnect at a certain interval and number of attempts.

You can use the dockerize utility to run your application after the RabbitMQ server is ready to respond to requests:

But, some rebbit images, like bitnami/rabbitmq, do a pre-configuration run first, and then restart the server in production mode. This behavior will trick your dockerize into giving it a response in the first stage of startup, then your application will start up and get an exception when trying to connect to RabbitMQ as the server will go into a restart.

In this case, it would be wise to use dockerize to get the first response from the server, and amphp-rabbitmq-manager to successfully get a connection after your application has started.

Versioning

makaronnik/amphp-rabbitmq-manager follows the semver semantic versioning specification.

License

The MIT License (MIT). Please see LICENSE for more information.


All versions of amphp-rabbitmq-manager with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
amphp/amp Version v2.6.*
kelunik/retry Version ^v1
phpinnacle/ridge Version 1.3.*
cspray/labrador-async-event Version ^2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package makaronnik/amphp-rabbitmq-manager contains the following files

Loading the files please wait ....