PHPackages                             enl/amqp-workers - 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. enl/amqp-workers

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

enl/amqp-workers
================

This library provides more object-oriented way to create amqp workers and producers

v1.0.0(9y ago)01521[4 issues](https://github.com/enl/amqpworkers/issues)MIT LicensePHPPHP ~5.6|~7.0

Since Sep 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/enl/amqpworkers)[ Packagist](https://packagist.org/packages/enl/amqp-workers)[ Docs](https://github.com/enl/amqpworkers)[ RSS](/packages/enl-amqp-workers/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

AMQP Workers library
====================

[](#amqp-workers-library)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e3afddf7feec2f7780b4283148513acebaba16eee79ccf504db771c28b9a2b96/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e6c2f616d71702d776f726b6572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enl/amqp-workers)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/ab9dc3db186e5b0d44445b4c23553a60495233a84d960979e05e2d3e5fb36323/68747470733a2f2f7472617669732d63692e6f72672f656e6c2f616d7170776f726b6572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/enl/amqpworkers)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/872ed9b5496a37ef7c0ae0fe7ae9df94bd477bb797d31b74d444d1994193f0df/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656e6c2f616d7170776f726b6572732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/enl/amqpworkers/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/32b0382822fd1c2ed7410ce0f6ae972d7f4fdcfc24b3f4ed996a12ac5f83de70/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e6c2f616d71702d776f726b6572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enl/amqp-workers)

All this library does is providing more fluent experience with AMQP. Original phpamqplib has very strange approach to its functions declarations.

I decided to create a tiny layer of abstraction which provides a bit more flexible interface:

```
$consumer = Consumer::factory($connection)
    ->withQueue(new Queue('consume_from'))
    ->withWorker($worker)
    ->run();
```

That is very short basic setup, `Consumer` has much more functions. Read [the manual](doc/getting-started.md) for more detailed description.

### Features

[](#features)

- More fluent and flexible interface than original [php-amqplib](https://github.com/php-amqplib/php-amqplib) library;
- Very lazy approach, amqp-related stuff is called only when you call `run` or `produce` functions.

Install
-------

[](#install)

```
composer require enl/amqp-workers

```

Usage
-----

[](#usage)

```
// Create AMQPConnection
$connection = new AMQPLazyConnection();

// We're using static `factory` function only for convenience with fluent interface
$consumer = Consumer::factory($connection)
    // set queue definition. all parameters are default
    ->withQueue(new Queue('consume_from'))
    // Worker is an object of WorkerInterface which handles given message body
    ->withWorker($worker)
    // declare and start consuming the queue
    ->run();
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
composer test

```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Alex Panshin](https://github.com/enl)
- [All Contributors](https://github.com/enl/amqpworkers/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3532d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50587ee520f9c618e4663b3e62d04bace5458d30d8644c71a1e510ed94075e1a?d=identicon)[enl](/maintainers/enl)

---

Top Contributors

[![enl](https://avatars.githubusercontent.com/u/670322?v=4)](https://github.com/enl "enl (33 commits)")

---

Tags

rabbitmqAMQPworkers

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/enl-amqp-workers/health.svg)

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

###  Alternatives

[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)[bschmitt/laravel-amqp

AMQP wrapper for Laravel and Lumen to publish and consume messages

2752.3M7](/packages/bschmitt-laravel-amqp)[php-amqplib/thumper

AMQP Tools

276210.8k8](/packages/php-amqplib-thumper)[videlalvaro/thumper

AMQP Tools

27783.1k3](/packages/videlalvaro-thumper)[mikemadisonweb/yii2-rabbitmq

Wrapper based on php-amqplib to incorporate messaging in your Yii2 application via RabbitMQ. Inspired by RabbitMqBundle for Symfony 2, really awesome package.

74262.1k1](/packages/mikemadisonweb-yii2-rabbitmq)[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)
