PHPackages                             gallna/amqp-event - 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. gallna/amqp-event

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

gallna/amqp-event
=================

Amqp message dispatcher

3.0.2(9y ago)0222PHPPHP &gt;=5.4.0

Since Apr 19Pushed 9y ago1 watchersCompare

[ Source](https://github.com/gallna/amqp-event)[ Packagist](https://packagist.org/packages/gallna/amqp-event)[ RSS](/packages/gallna-amqp-event/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (17)Used By (0)

PHP module
==========

[](#php-module)

Documentation
-------------

[](#documentation)

Examples
--------

[](#examples)

Rabit implementation
====================

[](#rabit-implementation)

Dispatch
========

[](#dispatch)

```

$envelope = new Amqp\Envelope();
$dispatcher = $amqp->getDispatcher();

// Publish message to queue
$dispatcher->dispatch("kernel.error", new Amqp\PublishEvent($envelope));
$dispatcher->dispatch("kernel.warning", new Amqp\PublishEvent($envelope));

// Publish message to exchange
$envelope->setExchangeName("exchangeName");

$dispatcher->dispatch("kernel.critical", new Amqp\PublishEvent($envelope));
$dispatcher->dispatch("kernel.notice", new Amqp\PublishEvent($envelope));
$dispatcher->dispatch("kernel.info", new Amqp\PublishEvent($envelope));
$dispatcher->dispatch("kernel.info", new Event());
$dispatcher->dispatch("kernel.message", new Event());

```

To ensure message delivery to queue/exchange - dispatch `MandatoryEvent` instead of `Event`

Exception handling
==================

[](#exception-handling)

[PHP SPL exceptions](http://php.net/manual/en/spl.exceptions.php#spl.exceptions.tree)

Logic Exceptions
----------------

[](#logic-exceptions)

Logic Exceptions are for errors that occur at compile time. Since PHP has no compile time in the sense this is meant, it usually is interpreted as "errors occuring during development", (like when the developer forgot to pass a depedency or rooting key)

LogicException are moved to `dead-letter` exchange because they represents error in the program logic. This kind of exception should lead directly to a fix in code and requeue messages

**DomainException** (a LogicException subset) is thew when naither of listeners consumed the event (either by acknowledging or rejecting message). This can't be fixed otherwise than removing not supported route or adding missing acknowledgement

Runtime Exceptions
------------------

[](#runtime-exceptions)

Runtime Exceptions are for unforseen errors (usually stemming from User Input) when the code is run.

Those exceptions may be triggered by temporary connection issues, rate limits etc. They are moved automatically to `wait` exchange to retry them later.

Throwable
---------

[](#throwable)

It's up to developer how to handle any other `Throwable` by wrapping Consumer into try-catch block.

- it might be moved to `headers` exchange - and retried after implementing fix
- might be moved to `dead-letter` exchange by message broker
- rejecting erroring messages with `AMQP_REQUEUE` flag creates stream of one and the same messages. Keep an eye on retry-count to avoid issues

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

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

Total

15

Last Release

3613d ago

Major Versions

v0.2 → 1.02016-04-22

v0.3 → 1.0.12016-04-28

1.0.2 → v2.x-dev2016-06-30

1.0.3 → 2.1.02016-07-12

2.1.0 → 3.0.02016-08-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/299c269db35972c9bb19adbbf2df009d6be266c858e763148daa0aa62ae37561?d=identicon)[gall\_na](/maintainers/gall_na)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/gallna-amqp-event/health.svg)

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

###  Alternatives

[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k853.6M8.3k](/packages/symfony-http-kernel)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k246.0M11.1k](/packages/symfony-framework-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k181.3M2.2k](/packages/symfony-security-bundle)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[php-task/php-task

Library to work with synchronous and asynchronous tasks in php.

27365.5k4](/packages/php-task-php-task)

PHPackages © 2026

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