dev-master
9999999-devSome helper classes to make it easier to work with ZeroMQ.
MIT
The Requires
The Development Requires
by Zander Janse van Rensburg
zeromq geevcookie
Wallogit.com
2017 © Pedro Peláez
Some helper classes to make it easier to work with ZeroMQ.
A couple of helper classes to make it easier to work with ZeroMQ., (*1)
This is still in the very early stages of development. Use at own risk., (*2)
Add the following to your composer.json:, (*3)
{
"require-dev": {
"geevcookie/zeromq-php-helpers": "dev-master"
}
}
Then run composer install --dev or composer update --dev., (*4)
Check the examples folder. Each of the files has to be run from the command line e.g:, (*5)
php examples/RequestReply/Broker.php
Below you will find quick breakdowns of the available examples:, (*6)
This example shows how you can have one broker managing the messages between multiple clients and multiple workers. The worker and the broker constantly send "heartbeat" messages between each other to ensure that the connection is still alive. When the client sends a message the broker receives it, finds the next worker, sends the message to the worker, receives the reply from the worker, and then sends it back to the original client. The client itself also has retry and timeout limits., (*7)
To see the example in action run the following commands:, (*8)
// First start the broker. php examples/RequestReply/Broker.php // Then start a worker or 2 or 3. php examples/RequestReply/Worker.php // Then run a client to see how the broker and the workers react. php examples/RequestReply/Client.php
Some helper classes to make it easier to work with ZeroMQ.
MIT
zeromq geevcookie