Releases: alchemy-fr/queue-component
Releases · alchemy-fr/queue-component
0.1.6
0.1.5
[0.1.5] - 2016-10-05
Added
MessageQueueRegistry::getConfigurations()
to retrieve available queue configurations
0.1.4
[0.1.4] - 2016-10-03
Added
- Queue registry class
0.1.3
[0.1.3] - 2016-09-07
Added
- Add
timeout
option to AMQP configuration for consume timeouts
0.1.2
[0.1.2] - 2016-08-01
Added
- Add dependency on psr/log to enable debug logging in queue wrappers
Removed
- Removed default dead letter exchange parameter value, must be explicitely configured from now on to be enabled
0.1.1
[0.1.1] - 2016-07-29
Added
- Add a changelog
- Add
AmqpFactory::create()
factory method to simplify initialisation
Fixed
- Quickstart code sample contained an error
0.1.0
Initial release
Provides a simple abstraction to publish and consume messages:
// Note: the following array contains all available parameters and their default values
// Every configuration key is optional, and its default value used when not defined in parameters
$configuration = Alchemy\Queue\Amqp\AmqpConfiguration::parse([
'host' => 'localhost',
'vhost' => '/',
'port' => 5672,
'user' => 'guest',
'password' => 'guest',
'exchange' => 'alchemy-exchange',
'dead-letter-exchange' => 'alchemy-dead-exchange',
'queue' => 'alchemy-queue'
]);
$factory = new Alchemy\Queue\Amqp\AmqpMessageQueueFactory($configuration);
// Publish a message
$factory->getNamedQueue('my-queue')->publish(new Message('message body', 'correlation-id'));
// Consume next message in queue
$handler = new Alchemy\Queue\NullMessageHandler();
$factory->getNamedQueue('my-queue')->handle($handler);