aztech / event-bus-extra-amqp
There is no license information available for the latest version (v1.0.1) of this package.
aztech/event-bus AMQP channel provider
v1.0.1
2014-08-28 13:31 UTC
Requires
- aztech/event-bus: ~1
- aztech/php-utils: ~0
- psr/log: ~1.0
- videlalvaro/php-amqplib: ~2
Requires (Dev)
- phpunit/phpunit: ~4.2
- squizlabs/php_codesniffer: ~1.5
- vektah/bugfree-dangerzone: ~0.2
This package is not auto-updated.
Last update: 2024-12-17 03:26:26 UTC
README
Build status
Stability
Installation
Via Composer
Composer is the only supported way of installing aztech/event-bus-extra-amqp . Don't know Composer yet ? Read more about it.
$ composer require "aztech/event-bus-extra-amqp":"~1"
Autoloading
Add the following code to your bootstrap file :
require_once 'vendor/autoload.php';
Dependencies
- videlalvaro/php-amqplib : ~2
Supported elements :
- Persistent publish
- Subscribe
Configuration options & defaults
Initialization
require_once 'vendor/autoload.php'; use \Aztech\Events\Bus\Events; use \Aztech\Events\Bus\Plugins\Amqp\Amqp; Amqp::loadPlugin(); // See options chart for actual parameters $options = array(...); $publisher = Events::createPublisher('amqp', $options); $event = Events::create('category', array('property' => 'value')); $publisher->publish($event); // ...
Caveats
At the time being, the AMQP event plugin uses topic based routing to publish events. Multiple nodes connecting to a single queue will work in round-robin mode.
It is possible to use different routing scenarios/exchange types, but that is left as an exercise to the reader (Hint: no need to build/patch the current plugin).