Download the PHP package kontoulis/rabbit-manager without Composer
On this page you can find all versions of the php package kontoulis/rabbit-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package rabbit-manager
Rabbit Manager (Standalone)
There is also a separate Laravel 5.1 package
Rabbit Manager is a standalone php package to easily manage RabbitMQ
- Built-in command line tools. Simple commands to add/receive messages to/from RabbitMQ
- Install as Standalone, or add it to your own project
- Built in Message Handler and Broker
Install with composer
Or use it as standalone
Add bin/rabbit-manager to /usr/local/bin
Use the default commands or create your own based on those.
Dependencies
- A running instance of RabbitMQ of course
Testing
Don't forget to run the tests!
Usage
There are two types of Jobs. One to add messages to a queue and one to listen to that queue.
Command Line
You can build your own commands based on the ones already defined in the package and then adding them in src/manager.php
The package includes 2 basic Commands You can run those from command line, or even add them to supervisor as workers for as many instances you need
- queue:add -> Adds a message to the specified queue
- queue:listen -> Consumes the messages from a queue
As a library
You can use the package as a library by creating your own CustomHandler and Broker. (However you can use broker as a four-liner to add a message to queue)
-
Adding messages to a queue
- Consuming the queue : To consume a queue you probabbly need a script to run from the command line, or a script that can run until the queue is empty. A good practice is to have a script just to listen to the Queue and a Handler to do the job with every received message. You can add that file as a worker to the supervisor or just run it as it is. You could also do all that in the same file.
Handler return values
These return values will tell the broker what to do after you process a message
Version
1.0.1
Feel free to give some feedback or ask any questions
All versions of rabbit-manager with dependencies
monolog/monolog Version 1.*
symfony/console Version ^2.7
swiftmailer/swiftmailer Version @stable