lefuturiste/rabbitmq-publisher

这是一个用于发布RabbitMQ消息的辅助工具。

v1.2.4 2020-04-10 20:38 UTC

This package is auto-updated.

Last update: 2024-09-11 14:48:17 UTC


README

这是一个用于发布RabbitMQ消息的辅助工具。

安装

composer require lefuturiste/rabbitmq-publisher

用法

$rabbitmqClient = new Lefuturiste\RabbitMQPublisher\Client('example.com', '424242', 'user', 'password', 'virtual_host');
//you can use array as message body
//body is json encoded
$rabbitmqClient->publish('Hello world', 'my_event');

测试

vendor/bin/phpunit tests/

享受吧!