chella/amqp

v0.0.1 2021-10-20 13:57 UTC

This package is auto-updated.

Last update: 2024-11-06 19:19:16 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

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