PHPackages                             thomasvargiu/amqpal - 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. thomasvargiu/amqpal

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

thomasvargiu/amqpal
===================

AMQP Abstraction Layer

0.3.1(10y ago)29.5kMITPHPPHP ^5.5 || ^7.0

Since Mar 22Pushed 10y ago1 watchersCompare

[ Source](https://github.com/thomasvargiu/AMQPAL)[ Packagist](https://packagist.org/packages/thomasvargiu/amqpal)[ Docs](https://github.com/thomasvargiu/RabbitMqModule)[ RSS](/packages/thomasvargiu-amqpal/feed)WikiDiscussions master Synced 2mo ago

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

AMQPAL
======

[](#amqpal)

[![Build Status](https://camo.githubusercontent.com/57e46f86dcebc84a65ffa72d29038a7e839da61ccae8eaa74ad4234a49288192/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74686f6d61737661726769752f414d5150414c2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thomasvargiu/AMQPAL/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/4124df27caf0111ebe4b519474549bb4cbe988b38346a75d057982ab8999fd09/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74686f6d61737661726769752f414d5150414c2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thomasvargiu/AMQPAL/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/cd454fb5a729a7ee73b3964cc30c908e9e94a6791f438db73508e48f299908e3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74686f6d61737661726769752f414d5150414c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thomasvargiu/AMQPAL/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/7559d2ce9e307ec05ffcd5c3134ba1037db8fd98565413ca75af3ff87489070f/68747470733a2f2f706f7365722e707567782e6f72672f74686f6d61737661726769752f414d5150414c2f762f737461626c65)](https://packagist.org/packages/thomasvargiu/AMQPAL)[![Total Downloads](https://camo.githubusercontent.com/e0436b24e86d61bdfc6ac6fc60dcb2642a0b77248338430641a75b5f525a1ac9/68747470733a2f2f706f7365722e707567782e6f72672f74686f6d61737661726769752f414d5150414c2f646f776e6c6f616473)](https://packagist.org/packages/thomasvargiu/AMQPAL)[![Latest Unstable Version](https://camo.githubusercontent.com/0fa3748ad4f573b3c47aac503409a3a4bd91baf5d2dc554c157fac5dbccea5a8/68747470733a2f2f706f7365722e707567782e6f72672f74686f6d61737661726769752f414d5150414c2f762f756e737461626c65)](https://packagist.org/packages/thomasvargiu/AMQPAL)[![License](https://camo.githubusercontent.com/b827223f462e7bbfc8ce61c2b89f07c15e6fb3d3125ac0995682fd12bc8ffe89/68747470733a2f2f706f7365722e707567782e6f72672f74686f6d61737661726769752f7261626269746d712d6d6f64756c652f6c6963656e7365)](https://packagist.org/packages/thomasvargiu/AMQPAL)

AMQP Abstraction Layer
----------------------

[](#amqp-abstraction-layer)

An abstraction layer to use different adapters.

Supported adapters:

- [php-amqplib](https://github.com/php-amqplib/php-amqplib) (`phpamqplib` in the factory)
- [php-amqp extension](https://github.com/pdezwart/php-amqp) (`amqp` in the factory)

### Example

[](#example)

```
use AMQPAL\Adapter;
use AMQPAL\Options;

$options = [
    'name' => 'amqp', // or phpamqplib
    'options' => [
        'host' => 'localhost',
        'username' => 'guest',
        'password' => 'guest',
        'vhost' => '/'
    ]
];

$factory = new Adapter\AdapterFactory();
$adapter = $factory->createAdapter($options);

$connection = $adapter->getConnection();
$channel = $connection->createChannel();

/*
 * Creating exchange...
 */
$exchangeOptions = new Options\ExchangeOptions([
    'name' => 'exchange-name',
    'type' => 'direct'
]);

$exchange = $channel->createExchange($exchangeOptions);

// or:
$exchange = $channel->createExchange([
    'name' => 'exchange-name',
    'type' => 'direct'
]);

/*
 * Creating queue...
 */
$queueOptions = new Options\QueueOptions([
    'name' => 'queue-name',
]);

$queue = $channel->createQueue($queueOptions);

// or:
$queue = $channel->createQueue([
    'name' => 'queue-name',
]);

$queue->declareQueue();
$queue->bind('exchange-name');

// publishing a message...
$exchange->publish('my message in the queue');

// get the next message in the queue...
$message = $queue->get();

// or consuming a queue...
$callback = function (Adapter\Message $message, Adapter\QueueInterface $queue) {
    // ack the message...
    $queue->ack($message->getDeliveryTag());

    // return false to stop consuming...
    return false;
};

// set channel qos to fetch just one message at time
$channel->setQos(null, 1);
// and consuming...
$queue->consume($callback); // This is a blocking function
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Total

5

Last Release

3664d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6fa237583695920bbe285e738810728bfd7981ab066d39ffe852e09ae1fd30e?d=identicon)[thomasvargiu](/maintainers/thomasvargiu)

---

Top Contributors

[![thomasvargiu](https://avatars.githubusercontent.com/u/732012?v=4)](https://github.com/thomasvargiu "thomasvargiu (31 commits)")

---

Tags

queuerabbitmqmessagingAMQP

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/thomasvargiu-amqpal/health.svg)

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

###  Alternatives

[bunny/bunny

Performant pure-PHP AMQP (RabbitMQ) non-blocking ReactPHP library

7426.5M37](/packages/bunny-bunny)[enqueue/enqueue-bundle

Message Queue Bundle

27615.6M38](/packages/enqueue-enqueue-bundle)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[bschmitt/laravel-amqp

AMQP wrapper for Laravel and Lumen to publish and consume messages

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

The Nuwber RabbitEvents package

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

Integrates php-amqplib with RabbitMq and Nette Framework

30693.1k4](/packages/kdyby-rabbitmq)

PHPackages © 2026

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