artox-lab / rabbitmq-wrapper
Wrapper for RabbitMQ
Installs: 2 372
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 16
Forks: 1
Open Issues: 1
Requires
- php: >=5.5.0
- php-amqplib/php-amqplib: 2.6.2
Requires (Dev)
- phpunit/phpunit: 5.2.*
This package is not auto-updated.
Last update: 2024-11-09 00:50:39 UTC
README
Installation via Composer
{ "require": { "artox-lab/rabbitmq-wrapper": "1.0.0" } }
Run composer update
Config Usage
<?php include 'vendor/autoload.php'; // Initial class $rabbitMQ = $rabbitMQ = new \RabbitMQWrapper\RabbitMQ(); // Creating new queue $rabbitMQ->createQueue($queueTitle); // Publishing message to queue $rabbitMQ->publishMessage($message, $queueTitle); // Getting last message from queue $rabbitMQ->getMessage($queueTitle); // Listening messages from queue (daemon mode) $rabbitMQ->startListening($queueTitle, $callback);