dev-master
9999999-devA PHP RabbitMQ library using php-amqplib
The Requires
The Development Requires
by Mark Dunphy
0.1.0
0.1.0.0A PHP RabbitMQ library using php-amqplib
The Requires
The Development Requires
by Mark Dunphy
Wallogit.com
2017 © Pedro Peláez
A PHP RabbitMQ library using php-amqplib
A PHP RabbitMQ library using php-amqplib, (*1)
These examples use the default localhost RabbitMQ server created when you install it. For production use (and you're crazy if you're doing this), you should configure a markdunphy\Ears\Connection object to pass in as the first argument to the markdunphy\Ears\Ears constructor., (*2)
Below is a simple hello world demonstration. Run the consumer code in one terminal tab and the publisher in another to watch things happen., (*3)
use \markdunphy\Ears\Ears;
$consumer = ( new Ears )->getConsumer();
$consumer->consumeBasic( 'hello', function( $message ) {
echo $message->body . "\n";
} );
use \markdunphy\Ears\Ears; $ears = new Ears( null, 'hello' ); $publisher = $ears->getPublisher(); $publisher->sendBasic( 'Hello world' );
A PHP RabbitMQ library using php-amqplib
A PHP RabbitMQ library using php-amqplib