Miguel Dantas 19d68c9f8e [COMPOSER] Added predis/predis and updated packages | 5 lat temu | |
---|---|---|
.. | ||
src | 3 lat temu | |
.gitignore | 3 lat temu | |
LICENSE | 3 lat temu | |
README.md | 3 lat temu | |
composer.json | 3 lat temu |
A simple object oriented wrapper for the RabbitMQ Management HTTP Api in PHP 5.3
Uses PHP-HTTP for requests.
Installable through composer via:
$ composer require richardfullmer/rabbitmq-management-api
Additionally, you require a httplug compatible client.
For example, use the guzzle6 adapter:
$ composer require php-http/guzzle6-adapter
<?php
use RabbitMq\ManagementApi\Client;
require_once __DIR__ . '/../vendor/autoload.php';
$client = new Client();
$queue = $client->queues()->get('/', 'sample-messages-queue');
$response = $client->exchanges()->publish('/', 'sample-messages', array(
'properties' => array(),
'routing_key' => '',
'payload' => 'This is a test',
'payload_encoding' => 'string'
));
if ($response['routed']) {
print 'Message delivered';
}
php-rabbitmq-management-api is licensed under the MIT License - see the LICENSE file for details
Structure from KnpLabs php-github-api
Rabbit's Excellent Message Queue