PHPackages                             jmcnualan/amqp - 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. jmcnualan/amqp

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

jmcnualan/amqp
==============

forked php-amqplib wrapper that eases the consumption of RabbitMQ. A painless way of using RabbitMQ

v1.5.1(4y ago)025MITPHPPHP &gt;=7.0

Since Sep 3Pushed 4y agoCompare

[ Source](https://github.com/jmcnualan/amqp)[ Packagist](https://packagist.org/packages/jmcnualan/amqp)[ RSS](/packages/jmcnualan-amqp/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (5)Versions (8)Used By (0)

anik/amqp
---------

[](#anikamqp)

`anik/amqp` is a php-amqplib wrapper that eases the consumption of RabbitMQ. A painless way of using RabbitMQ.

You can use this package with

- [Laravel](https://github.com/laravel/laravel)
- [Lumen](https://github.com/laravel/lumen)
- [Laravel Zero](https://github.com/laravel-zero/laravel-zero)

Requirements
------------

[](#requirements)

This package requires the following

- php &gt;= 7.0
- ext-bcmath
- ext-sockets

Installation
------------

[](#installation)

The package works with Laravel, Lumen &amp; Laravel zero. Install it via composer.

> `composer require anik/amqp`

### For Laravel

[](#for-laravel)

The service provider will automatically get registered. Or you may manually add the service provider in your `config/app.php` providers array:

```
'providers' => [
    /// ...
    Anik\Amqp\ServiceProviders\AmqpServiceProvider::class,
]
```

- Add configuration file `amqp.php` in your config directory with the following command.

```
php artisan vendor:publish --provider="Anik\Amqp\ServiceProviders\AmqpServiceProvider"
```

### For Lumen

[](#for-lumen)

- Add the service provider in your `bootstrap/app.php` file.

```
$app->register(Anik\Amqp\ServiceProviders\AmqpServiceProvider::class);
```

- Add configuration `amqp.php` in your config directory by copying it from `vendor/anik/amqp/src/config/amqp.php`. Don't forget to add `$app->configure('amqp');` to your `bootstrap/app.php`.

N.B: **For Lumen, you don't need to enable Facade.**

### For Laravel Zero

[](#for-laravelzero)

- Add provider in your `config/app.php` providers array.

```
'providers' => [
    /// ...
    Anik\Amqp\ServiceProviders\AmqpServiceProvider::class,
]
```

- Add configuration `amqp.php` in your config directory by copying it from `vendor/anik/amqp/src/config/amqp.php`.

Usage
-----

[](#usage)

- To Publish a message

```
