hautelook / rabbitmq-api
PHP library to interact with the RabbitMQ API
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 1 191
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 12
Forks: 4
Open Issues: 0
Requires
- php: >= 5.5
- guzzle/guzzle: ~3.9
- symfony/options-resolver: ~2.5
- symfony/property-access: ~2.5
This package is not auto-updated.
Last update: 2022-01-17 14:02:09 UTC
README
This library exposes the RabbitMQ Management API to PHP through Guzzle.
1. Installation
- Require the package via composer
$ composer require "hautelook/rabbitmq-api"
- Instantiate the library:
$client = new \Hautelook\RabbitMQ\Client( [ 'hostname' => 'localhost', // Default, don't have to pass this in 'scheme' => 'https', // Default, don't have to pass this in 'port' => 8080, // Default, don't have to pass this in 'username' => 'guest', // Default, don't have to pass this in 'password' => 'guest', // Default, don't have to pass this in 'ssl' => true // Default, don't have to pass this in ] );
2. Usage
2.1 Getting an overview
$overview = $client->getOverview(); print_r($overview);
2.2 Retrieving a queue
$queue = $client->getQueue('/', 'my_queue_name'); print_r($queue);
3. Running tests
You can run the unit and functional tests for this library by running phpunit
after installing
the dependencies.