PHPackages                             leadtech/boot-rabbit-mq - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. leadtech/boot-rabbit-mq

ActiveLibrary[Queues &amp; Workers](/categories/queues)

leadtech/boot-rabbit-mq
=======================

1.2.1(10y ago)110.1kproprietaryPHPPHP &gt;=5.4.0

Since Aug 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Leadtech/boot-rabbit-mq)[ Packagist](https://packagist.org/packages/leadtech/boot-rabbit-mq)[ RSS](/packages/leadtech-boot-rabbit-mq/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (9)Versions (10)Used By (0)

Quickstart
==========

[](#quickstart)

This library provides an easy to way to get up and running with RabbitMQ very quickly. To implement rabbitMQ you'll first need to create an instance of the QueueTemplate class. This class represents a single line of communication between consumer(s) and producer(s). Both the producer and the consumer classes will use the same template. Once the template is available you'll have to subclass the AbstractConsumer class and implement a handle method. Incoming messages are delegated to this method. The handle method returns either true or false indicating the success status.

To implement a producer simply instantiate or subclass `Boot\RabbitMQ\Producer\Producer` or `Boot\RabbitMQ\Producer\BatchProducer`providing the queue template instance in the constructor. There is a command available that you can use to publish messages using the console.

### Full example

[](#full-example)

Full example of a fault tolerant queue. The messages are persisted and will survive a restart. The client is configured to sent ACK/NACK signals manually.

#### Create worker.php

[](#create-workerphp)

```
