PHPackages                             mpsaravanan/tail - 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. mpsaravanan/tail

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

mpsaravanan/tail
================

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

v1.0.4(10y ago)1475MITPHPPHP &gt;=5.4.7

Since Jul 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mpsaravanan/tail)[ Packagist](https://packagist.org/packages/mpsaravanan/tail)[ RSS](/packages/mpsaravanan-tail/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

mpsaravanan/tail
================

[](#mpsaravanantail)

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

[![Build Status](https://camo.githubusercontent.com/6fda66c204f0eaf8036f69d2f19904dcc023e248df788094b7a5e82d6940db44/68747470733a2f2f7472617669732d63692e6f72672f6d6f6f6b6f66652f7461696c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mookofe/tail)[![Latest Stable Version](https://camo.githubusercontent.com/edf42270f363b99a7b11721682c7c72ee6f3eba1f13ca3236c7993691c2e052c/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6f6b6f66652f7461696c2f762f737461626c652e737667)](https://packagist.org/packages/mookofe/tail)[![License](https://camo.githubusercontent.com/95676346e7a82ff266a1484ddde0dae97b270e3ef7fda609ce76f1d2725e3589/68747470733a2f2f706f7365722e707567782e6f72672f6d6f6f6b6f66652f7461696c2f6c6963656e73652e737667)](https://packagist.org/packages/mookofe/tail)

Features
--------

[](#features)

- Simple queue configuration
- Multiple server connections
- Add message to queues easily
- Listen queues with useful options

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

[](#requirements)

- php-amqplib/php-amqplib: 2.\*

Version
-------

[](#version)

1.0.4

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

[](#installation)

**Preparation**

Open your composer.json file and add the following to the require array:

```
"mpsaravanan/tail": "dev-master"
```

**Install dependencies**

```
$ php composer install

```

Or

```
$ php composer update
```

Integration
-----------

[](#integration)

### Laravel

[](#laravel)

After installing the package, open your Laravel config file **config/app.php** and add the following lines.

In the $providers array add the following service provider for this package.

```
'Mookofe\Tail\ServiceProvider',
```

In the $aliases array add the following facade for this package.

```
'Tail' => 'Mookofe\Tail\Facades\Tail',
```

Add servers connection file running:

```
$ php artisan vendor:publish --provider="Mookofe\Tail\ServiceProvider" --tag="config"
```

### Lumen

[](#lumen)

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

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

//...

$app->configure('tail-settings');
$app->register(Mookofe\Tail\LumenServiceProvider::class);

//...
```

Make sure sure `$app->withFacades();` is uncomment in your **bootstrap/app.php** file

Create a **config** folder in the root directory of your Lumen application and copy the content from **vendor/mookofe/tail/config/tail.php** to **config/tail-settings.php**.

RabbitMQ Connections
--------------------

[](#rabbitmq-connections)

By default the library will use the RabbitMQ installation credentials (on a fresh installation the user "guest" is created with password "guest").

To override the default connection or add more servers, edit the RabbitMQ connections file at: **config/tail-settings.php**

```
return array(

    'default' => 'default_connection',

    'connections' => array(

        'default_connection' => array(
            'host'         => 'localhost',
            'port'         => 5672,
            'username'     => 'guest',
            'password'     => 'guest',
            'vhost'        => '/',
            'exchange'     => 'default_exchange_name',
            'consumer_tag' => 'consumer',
        ),
        'other_server' => array(
            'host'         => '192.168.0.10',
            'port'         => 5672,
            'username'     => 'guest',
            'password'     => 'guest',
            'vhost'        => '/',
            'exchange'     => 'default_exchange_name',
            'consumer_tag' => 'consumer',
        ),
    ),
);
```

Adding messages to queue:
-------------------------

[](#adding-messages-to-queue)

**Adding a simple message**

```
    Tail::add('queue-name', 'message');
```

**Adding message changing RabbitMQ server**

```
    Tail::add('queue-name', 'message', array('connection_name' => 'connection_name_config_file'));
```

**Adding message with different exchange**

```
    Tail::add('queue-name', 'message', array('exchange' => 'exchange_name'));
```

**Adding message with different options**

```
	$options = array (
		'connection_name' => 'connection_name_config_file',
		'exchange' => 'exchange_name',
		'vhost' => 'vhost',
		'type' => 'type_name',
	);

    Tail::add('queue-name', 'message', $options);
```

**Using Tail object**

```
	$message = new Tail::createMessage;
	$message->queue_name = 'queue-name';
	$message->message = 'message';
	$message->connection_name = 'connection_name_in_config_file';
	$message->exchange = 'exchange_name';
	$message->vhost = 'vhost';

	$message->save();
```

Listening queues:
-----------------

[](#listening-queues)

**Closure based listener**

```
Tail::listen('queue-name', function ($message) {

	//Your message logic code
});
```

**Closure listener with options**

```
$options = array(
	'message_limit' => 50,
	'time' => 60,
	'empty_queue_timeout' => 5,
	'connection_name' => 'connection_name_in_config_file',
    'exchange' => 'exchange_name',
    'vhost' => 'vhost'
);

Tail::listenWithOptions('queue-name', $options, function ($message) {

	//Your message logic code
});
```

**Options definitions:**

NameDescriptionDefault valuequeue\_nameQueue name on RabbitMQ\* Requiredmessage\_limitNumber of messages to be processed0: UnlimitedtimeTime in seconds the process will be running0: Unlimitedempty\_queue\_timeoutTime in seconds to kill listening when the queue is empty0: Unlimitedconnection\_nameServer connection nameDefined at connections fileexchangeExchange name on RabbitMQ ServerSpecified on connections filevhostVirtual host on RabbitMQ ServerSpecified on connections fileBy default the listen process will be running forever unless you specify one of the running time arguments above (message\_limit, time, empty\_queue\_timeout). They can be mixed all together, so when one of the condition is met the process will be stopped.

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 70.8% of commits — single point of failure

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 ~74 days

Total

5

Last Release

3717d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7737052?v=4)[saravananmp](/maintainers/mpsaravanan)[@mpsaravanan](https://github.com/mpsaravanan)

---

Top Contributors

[![mookofe](https://avatars.githubusercontent.com/u/2395540?v=4)](https://github.com/mookofe "mookofe (34 commits)")[![mpsaravanan](https://avatars.githubusercontent.com/u/7737052?v=4)](https://github.com/mpsaravanan "mpsaravanan (14 commits)")

---

Tags

clientlaravelpackagequeuerabbitmqlaravel5Victor Cruzmookofe

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mpsaravanan-tail/health.svg)

```
[![Health](https://phpackages.com/badges/mpsaravanan-tail/health.svg)](https://phpackages.com/packages/mpsaravanan-tail)
```

###  Alternatives

[mookofe/tail

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

5352.8k](/packages/mookofe-tail)[bschmitt/laravel-amqp

AMQP wrapper for Laravel and Lumen to publish and consume messages

2802.4M7](/packages/bschmitt-laravel-amqp)[nuwber/rabbitevents

The Nuwber RabbitEvents package

122529.7k4](/packages/nuwber-rabbitevents)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

43140.3k](/packages/harris21-laravel-fuse)[convenia/pigeon

3334.2k](/packages/convenia-pigeon)

PHPackages © 2026

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