Download the PHP package evaneos/burrow without Composer
On this page you can find all versions of the php package evaneos/burrow. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package burrow
Burrow
Evaneos AMQP library able to use both php-amqplib and pecl amqp C librairy
Installation
Usage
See examples directory for more details
To test it, you may use a rabbitmq container, this one feets perfectly
Declare an exchange and bind a queue with RabbitMQ
Asynchronous management
Dispatching an async message with RabbitMQ
Write a daemon to consume async messages from RabbitMQ
In the command-line, launch both scripts from a different terminal, the message 'my_message', should be displayed in the worker terminal.
Synchronous management
Dispatching an async message with RabbitMQ
Write a daemon to consume async messages from RabbitMQ
In the command-line, launch both scripts from a different terminal, the message 'my_message', should be displayed in the publisher terminal.
Events
You can add your emitter to subscribe events:
- DaemonStart
- DaemonStopped
- MessageReceived
- MessageConsumed
Metrics
Based on events, you can subscribe a built-in metric publisher which will send this metrics:
daemon.started
(increment)daemon.stopped
(increment)daemon.message_received
(increment)daemon.message_consumed
(increment)daemon.message_processing_time
(timing)
There is an implementation for StatsD and DogStatsD.
Examples
All these examples are also available in the example
directory.
Handlers
You can now use handlers to modify the consumption behaviour. For retro-compatibility reasons, a
ContinueOnFailureHandler
has been created to reproduce the previous default behaviour. Please, do not use it anymore
as it is quite dangerous to allow the worker to continue when receiving an error.
To ease the use of the handlers, please build the handler stack using HandlerBuilder
.
All versions of burrow with dependencies
php-amqplib/php-amqplib Version ^2.6
psr/log Version ~1.0
symfony/console Version ^2.8|^3.0|^4.0
beberlei/assert Version ^2.6
beberlei/metrics Version ^2.8
evaneos/daemon Version ^2.0
league/event Version ^2.2
ext-pcntl Version *