PHPackages                             softonic/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. [Queues &amp; Workers](/categories/queues)
4. /
5. softonic/laravel-amqp

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

softonic/laravel-amqp
=====================

AMQP wrapper for Laravel and Lumen to publish and consume messages

2.4.0(2y ago)112.7kMITPHPPHP &gt;=7.0

Since Jun 29Pushed 2y agoCompare

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

READMEChangelog (5)Dependencies (7)Versions (31)Used By (0)

softonic/laravel-amqp
=====================

[](#softoniclaravel-amqp)

AMQP wrapper for Laravel and Lumen to publish and consume messages especially from RabbitMQ

[![Build Status](https://camo.githubusercontent.com/1da3849f14da504c3f19308a3cdd6442a7f9b12517d386ad5060dfde86ca54fb/68747470733a2f2f7472617669732d63692e6f72672f736f66746f6e69632f6c61726176656c2d616d71702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/softonic/laravel-amqp)[![Latest Stable Version](https://camo.githubusercontent.com/c4f68f99d1f43d5e1bccdd88ed261ffd01804f9f72f13b35c8f263886021a155/68747470733a2f2f706f7365722e707567782e6f72672f736f66746f6e69632f6c61726176656c2d616d71702f762f737461626c652e737667)](https://packagist.org/packages/softonic/laravel-amqp)[![License](https://camo.githubusercontent.com/e6fdc319d9fe9e8e83fd9f86c97d45838e37f8fb34d3a5e1842dd716d1ee787f/68747470733a2f2f706f7365722e707567782e6f72672f736f66746f6e69632f6c61726176656c2d616d71702f6c6963656e73652e737667)](https://packagist.org/packages/softonic/laravel-amqp)

Features
--------

[](#features)

- Advanced queue configuration
- Add message to queues easily
- Listen queues with useful options

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

[](#installation)

### Composer

[](#composer)

Add the following to your require part within the composer.json:

```
"softonic/laravel-amqp": "2.*" (Laravel >= 5.5)
"softonic/laravel-amqp": "1.*" (Laravel  'production',

    'properties' => [

        'production' => [
            'host'                => 'localhost',
            'port'                => 5672,
            'username'            => 'username',
            'password'            => 'password',
            'vhost'               => '/',
            'exchange'            => 'amq.topic',
            'exchange_type'       => 'topic',
            'consumer_tag'        => 'consumer',
            'ssl_options'         => [], // See https://secure.php.net/manual/en/context.ssl.php
            'connect_options'     => [], // See https://github.com/php-amqplib/php-amqplib/blob/master/PhpAmqpLib/Connection/AMQPSSLConnection.php
            'queue_properties'    => ['x-ha-policy' => ['S', 'all']],
            'exchange_properties' => [],
            'timeout'             => 0
        ],

    ],

];
```

Register the Lumen Service Provider in **bootstrap/app.php**:

```
/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
*/

//...

$app->configure('amqp');
$app->register(Softonic\Amqp\LumenServiceProvider::class);

//...
```

Add Facade Support for Lumen 5.2+

```
//...
$app->withFacades(true, [
    'Softonic\Amqp\Facades\Amqp' => 'Amqp',
]);
//...
```

### Laravel

[](#laravel)

Open **config/app.php** and add the service provider and alias:

```
'Softonic\Amqp\AmqpServiceProvider',
```

```
'Amqp' => 'Softonic\Amqp\Facades\Amqp',
```

Publishing a message
--------------------

[](#publishing-a-message)

### Push message with routing key

[](#push-message-with-routing-key)

```
    Amqp::publish('routing-key', 'message');
```

### Push message with routing key and create queue

[](#push-message-with-routing-key-and-create-queue)

```
    Amqp::publish('routing-key', 'message' , ['queue' => 'queue-name']);
```

### Push message with routing key and overwrite properties

[](#push-message-with-routing-key-and-overwrite-properties)

```
    Amqp::publish('routing-key', 'message' , ['exchange' => 'amq.direct']);
```

Consuming messages
------------------

[](#consuming-messages)

### Consume messages, acknowledge and stop when no message is left

[](#consume-messages-acknowledge-and-stop-when-no-message-is-left)

```
Amqp::consume('queue-name', function ($message, $resolver) {

   var_dump($message->body);

   $resolver->acknowledge($message);

   $resolver->stopWhenProcessed();

});
```

### Consume messages forever

[](#consume-messages-forever)

```
Amqp::consume('queue-name', function ($message, $resolver) {

   var_dump($message->body);

   $resolver->acknowledge($message);

});
```

### Consume messages, with custom settings

[](#consume-messages-with-custom-settings)

```
Amqp::consume('queue-name', function ($message, $resolver) {

   var_dump($message->body);

   $resolver->acknowledge($message);

}, [
	'timeout' => 2,
	'vhost'   => 'vhost3'
]);
```

Fanout example
--------------

[](#fanout-example)

### Publishing a message

[](#publishing-a-message-1)

```
\Amqp::publish('', 'message' , [
    'exchange_type' => 'fanout',
    'exchange' => 'amq.fanout',
]);
```

### Consuming messages

[](#consuming-messages-1)

```
\Amqp::consume('', function ($message, $resolver) {
    var_dump($message->body);
    $resolver->acknowledge($message);
}, [
    'exchange' => 'amq.fanout',
    'exchange_type' => 'fanout',
    'queue_force_declare' => true,
    'queue_exclusive' => true,
    'persistent' => true // required if you want to listen forever
]);
```

Credits
-------

[](#credits)

- Package based on

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~121 days

Recently: every ~278 days

Total

23

Last Release

931d ago

Major Versions

1.2.6 → 2.0.02018-06-01

PHP version history (2 changes)1.2.1PHP &gt;=5.5.9

2.0.0PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/524887?v=4)[Joskfg](/maintainers/Joskfg)[@joskfg](https://github.com/joskfg)

---

Top Contributors

[![bschmitt](https://avatars.githubusercontent.com/u/239644?v=4)](https://github.com/bschmitt "bschmitt (46 commits)")[![Serginyu](https://avatars.githubusercontent.com/u/22319383?v=4)](https://github.com/Serginyu "Serginyu (13 commits)")[![mirkojotic](https://avatars.githubusercontent.com/u/10652272?v=4)](https://github.com/mirkojotic "mirkojotic (6 commits)")[![joskfg](https://avatars.githubusercontent.com/u/524887?v=4)](https://github.com/joskfg "joskfg (5 commits)")[![ni-bschmitt](https://avatars.githubusercontent.com/u/58559970?v=4)](https://github.com/ni-bschmitt "ni-bschmitt (4 commits)")[![SpaceK33z](https://avatars.githubusercontent.com/u/533616?v=4)](https://github.com/SpaceK33z "SpaceK33z (4 commits)")[![jwkblades](https://avatars.githubusercontent.com/u/517211?v=4)](https://github.com/jwkblades "jwkblades (3 commits)")[![xaviapa](https://avatars.githubusercontent.com/u/8439057?v=4)](https://github.com/xaviapa "xaviapa (3 commits)")[![junaidnasir](https://avatars.githubusercontent.com/u/10703810?v=4)](https://github.com/junaidnasir "junaidnasir (3 commits)")[![stevenklar](https://avatars.githubusercontent.com/u/379650?v=4)](https://github.com/stevenklar "stevenklar (3 commits)")[![josemanuel-cardona](https://avatars.githubusercontent.com/u/196229448?v=4)](https://github.com/josemanuel-cardona "josemanuel-cardona (3 commits)")[![hertzigger](https://avatars.githubusercontent.com/u/4991108?v=4)](https://github.com/hertzigger "hertzigger (2 commits)")[![smartyaunt](https://avatars.githubusercontent.com/u/12381885?v=4)](https://github.com/smartyaunt "smartyaunt (2 commits)")[![lukebakken](https://avatars.githubusercontent.com/u/514926?v=4)](https://github.com/lukebakken "lukebakken (1 commits)")[![alupuleasa](https://avatars.githubusercontent.com/u/26110108?v=4)](https://github.com/alupuleasa "alupuleasa (1 commits)")[![dennisgon](https://avatars.githubusercontent.com/u/6257311?v=4)](https://github.com/dennisgon "dennisgon (1 commits)")[![emil-nasso](https://avatars.githubusercontent.com/u/1119706?v=4)](https://github.com/emil-nasso "emil-nasso (1 commits)")[![AidasK](https://avatars.githubusercontent.com/u/2088484?v=4)](https://github.com/AidasK "AidasK (1 commits)")[![MattBearson](https://avatars.githubusercontent.com/u/17829867?v=4)](https://github.com/MattBearson "MattBearson (1 commits)")[![rmundel](https://avatars.githubusercontent.com/u/13142574?v=4)](https://github.com/rmundel "rmundel (1 commits)")

---

Tags

laravelpackagelumenqueuerabbitmqmessage queueAMQPlaravel5softonicBjörn Schmitt

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/softonic-laravel-amqp/health.svg)

```
[![Health](https://phpackages.com/badges/softonic-laravel-amqp/health.svg)](https://phpackages.com/packages/softonic-laravel-amqp)
```

###  Alternatives

[bschmitt/laravel-amqp

AMQP wrapper for Laravel and Lumen to publish and consume messages

2752.3M7](/packages/bschmitt-laravel-amqp)[mookofe/tail

RabbitMQ and PHP client for Laravel and Lumen that allows you to add and listen queues messages just simple

5552.5k](/packages/mookofe-tail)[nuwber/rabbitevents

The Nuwber RabbitEvents package

120515.8k3](/packages/nuwber-rabbitevents)[iamfarhad/laravel-rabbitmq

A robust RabbitMQ driver for Laravel Queue with advanced message queuing, reliable delivery, and high-performance async processing capabilities

3215.6k](/packages/iamfarhad-laravel-rabbitmq)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
