PHPackages                             roryy/trafficjam - 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. roryy/trafficjam

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

roryy/trafficjam
================

Queue Library for RabbitMQ or SQS

v0.6.1(3y ago)118MITPHPPHP &gt;=7.4

Since Jun 22Pushed 3y ago2 watchersCompare

[ Source](https://github.com/roryy/trafficjam)[ Packagist](https://packagist.org/packages/roryy/trafficjam)[ RSS](/packages/roryy-trafficjam/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (13)Used By (0)

Traffic jam
===========

[](#traffic-jam)

PHP queue library for RabbitMQ. It's possible to add more queue types like SQS

Please do not use in production as BC breaks can occur before reaching version 1.0.

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

[](#installation)

```
composer require roryy/trafficjam "0.6.*"

```

Usage
-----

[](#usage)

To use the Trafficjam library in combination with Rabbitmq, you have to setup your Rabbitmq credentials first.

Like this:

```
use Trafficjam\Infrastructure\RabbitMq\Connection;
use Trafficjam\Infrastructure\RabbitMq\RabbitMqQueue;

$connection = new Connection('localhost', 5672, 'guest', 'guest');

```

Then create a queue like this:

```
$queue = new RabbitMqQueue($connection, $queueName, $durable, $exchange, $routingKey);
$trafficjam = new Trafficjam($queue);

```

To publish one or more messages to your queue:

```
$trafficjam->publish('test 1');
$trafficjam->publish('test 2');

```

And consume (with a callback), don't forget to acknowledge

```
$trafficjam->consume(function (Consumable $msg) use ($trafficjam) {
    $message = $msg->getMessage();
    echo ' msg: '. $message .PHP_EOL;

    $trafficjam->acknowledge($msg);
});

```

This will output:

```
test 1
test 2

```

Future
------

[](#future)

In the future this library will also going to support SQS.

Contribute
----------

[](#contribute)

If you want to use another queuing system besides RabbitMQ then please implement the Queue interface when creating your own. Please create a pull request.

License
-------

[](#license)

Trafficjam is licensed under the MIT License. See the bundled LICENSE file for details.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~268 days

Recently: every ~165 days

Total

11

Last Release

1302d ago

PHP version history (5 changes)v0.1.0PHP &gt;=5.3

v0.3.0PHP &gt;=7.1

v0.5.0PHP ^7.1

v0.5.2PHP ^7.1|^8.0

v0.6.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/091b5f8a41b5efe9979f514efbebd9188c999df4f5a64bd52b2a995bea29c6f6?d=identicon)[roryy](/maintainers/roryy)

---

Top Contributors

[![roryy](https://avatars.githubusercontent.com/u/1478308?v=4)](https://github.com/roryy "roryy (43 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/roryy-trafficjam/health.svg)

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

###  Alternatives

[symfony/messenger

Helps applications send and receive messages to/from other applications or via message queues

1.1k120.7M958](/packages/symfony-messenger)[php-amqplib/rabbitmq-bundle

Integrates php-amqplib with Symfony &amp; RabbitMq. Formerly emag-tech-labs/rabbitmq-bundle, oldsound/rabbitmq-bundle.

1.3k20.1M65](/packages/php-amqplib-rabbitmq-bundle)[hyperf/amqp

A amqplib for hyperf.

241.2M56](/packages/hyperf-amqp)[convenia/pigeon

3233.0k](/packages/convenia-pigeon)

PHPackages © 2026

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