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

ActiveLibrary

alive2212/laravel-amqp
======================

{This is Fork of anik/amqp package} of php-amqplib wrapper that eases the consumption of RabbitMQ. A painless way of using RabbitMQ

1.5.4(5y ago)162MITPHPPHP &gt;=7.0

Since Sep 3Pushed 5y agoCompare

[ Source](https://github.com/Alive2212/laravel_amqp)[ Packagist](https://packagist.org/packages/alive2212/laravel-amqp)[ RSS](/packages/alive2212-laravel-amqp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (11)Used By (0)

This is fork of anik/amqp for our usage. in this package we change 'resolveConnectionName' and 'getConnection' method to a public method, to customize our channel and queue and exchange. Many Many Thanks `anik/amqp`anik/amqp
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#this-is-fork-of-anikamqp-for-our-usagein-this-package-we-change-resolveconnectionname-and-getconnection-method-to-a-public-method-to-customize-our-channel-and-queue-and-exchangemany-many-thanks-anikamqpanikamqp)

`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

```
