Download the PHP package femike/yii2-amqp-rrobin without Composer
On this page you can find all versions of the php package femike/yii2-amqp-rrobin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download femike/yii2-amqp-rrobin
More information about femike/yii2-amqp-rrobin
Files in femike/yii2-amqp-rrobin
Package yii2-amqp-rrobin
Short Description Yii 2 extension wrapper to communicate with RabbitMQ server via AMQP. Based on videlalvaro/php-amqplib. forked webtoucher/yii2-amqp with supported round robin
License BSD-3-Clause
Homepage https://github.com/femike/yii2-amqp-rrobin
Informations about the package yii2-amqp-rrobin
yii2-amqp
AMQP extension wrapper to communicate with RabbitMQ server. Based on videlalvaro/php-amqplib.
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the section of your composer.json
file.
Add the following in your console config:
Add messages interpreter class @app/components/RabbitInterpreter
with your handlers for different routing keys:
Usage
Just run command
to listen topics with any routing keys on default exchange or
to listen topics with one routing key.
Run command
to listen direct messages on selected exchange.
Also you can create controllers for your needs. Just use for your web controllers class
webtoucher\amqp\controllers\AmqpConsoleController
instead of yii\web\Controller
and for your console controllers
class webtoucher\amqp\controllers\AmqpConsoleController
instead of yii\console\Controller
. AMQP connection will be
available with property connection
. AMQP channel will be available with property channel
.
Example usage round robin
run same listen consumers
send message from console controller
or
All versions of yii2-amqp-rrobin with dependencies
php-amqplib/php-amqplib Version ~2.0
webtoucher/yii2-commands Version *