Download the PHP package astepin/rabbitmq-module without Composer
On this page you can find all versions of the php package astepin/rabbitmq-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download astepin/rabbitmq-module
More information about astepin/rabbitmq-module
Files in astepin/rabbitmq-module
Package rabbitmq-module
Short Description Integrates php-amqplib with Zend Framework 3 and RabbitMq
License MIT
Homepage https://github.com/astepin/RabbitMqModule
Informations about the package rabbitmq-module
RabbitMqModule
Integrates php-amqplib with Zend Framework 3 and RabbitMq.
Inspired from RabbitMqBundle for Symfony 2
Usage
Connections
You can configure multiple connections in configuration:
Option classes
You can find all available options here:
Retrieve the service
You can retrieve the connection from service locator:
Producers
You can configure multiple producers in configuration:
Option classes
You can find all available options here:
Retrieve the service
You can retrieve the producer from service locator:
Consumers
You can configure multiple consumers in configuration:
Option classes
You can find all available options here:
Callback
The key must contain one of the following:
- A : a closure or an invokable object that receive an object.
- An instance of .
- A string service name in service locator (can be anything or an instance of .
Take a look on class constants for available return values.
If your callback return than the message will be rejected and requeued.
If your callback return anything else different from and one of constants, the default response is like constant.
Retrieve the service
You can retrieve the consumer from service locator:
There is a console command available to list and start consumers. See below.
Consumer Example
Exchange2exchange binding
You can configure exchange2exchange binding in producers or consumers. Example:
Console usage
There are some console commands available:
- : Setup fabric for each service, declaring exchanges and queues
- : List available consumers
- : Start a consumer by name
- : Start a rpc server by name
- : Send a message with a producer
All versions of rabbitmq-module with dependencies
ext-amqp Version *
php-amqplib/php-amqplib Version ~2.6
zendframework/zend-stdlib Version ~3.0
zendframework/zend-servicemanager Version ~3.1
zendframework/zend-modulemanager Version ~2.7
zendframework/zend-console Version ~2.6
zendframework/zend-mvc-console Version ~1.1.10
zendframework/zend-serializer Version ~2.8
zendframework/zend-router Version ~3.0