alchemy/queue-component
最新稳定版本:0.1.6
Composer 安装命令:
composer require alchemy/queue-component
包简介
Message queue component
README 文档
README
alchemy/queue-component is a library providing a minimalist publish/subscribe abstraction over AMQP
Installation
The only supported installation method is via Composer. Run the following command to require the package in your project:
composer require alchemy/queue-component
Quickstart guide
// 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 $parameters = [ 'host' => 'localhost', 'vhost' => '/', 'port' => 5672, 'user' => 'guest', 'password' => 'guest', 'exchange' => 'alchemy-exchange', 'dead-letter-exchange' => 'alchemy-dead-exchange', 'queue' => 'alchemy-queue' ]; $factory = Alchemy\Queue\Amqp\AmqpMessageQueueFactory::create($parameters); // Publish a message $factory->getNamedQueue('my-queue')->publish(new Message('message body', 'correlation-id')); // Consume next message in queue $handler = new Alchemy\Queue\NullMessageHandler(); $resolver = new Alchemy\Queue\MessageHandlerResolver($handler); $factory->getNamedQueue('my-queue')->handle($resolver);
统计信息
- 总下载量: 57.86k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-03-27