lefuturiste / rabbitmq-publisher
这是一个用于发布RabbitMQ消息的辅助工具。
v1.2.4
2020-04-10 20:38 UTC
Requires
- ext-json: *
- php-amqplib/php-amqplib: ^2.7
Requires (Dev)
- phpunit/phpunit: ^6.4
- vlucas/phpdotenv: ^3.4
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/
享受吧!