chella / amqp
library
v0.0.1
2021-10-20 13:57 UTC
Requires
- php-amqplib/php-amqplib: ^3.0
README
Setup
Composer
composer require chella/amqp
Write a service
include autoload
require_once "./vendor/autoload.php";
import service
use chella\amqp\App;
create instance
1st arg is hostname
2nd arg is username
3rd arg is password
4th arg is port
5th arg is vhost
$context = App::context('localhost', 'guest', 'guest', 5672, '/');
publish message
1st arg is message
2nd arg is exchange
3rd arg is routing_key
$context->publish('hello world', 'test', 'test_routing');
Happy coding