PHPackages                             jtl/nachricht - 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. jtl/nachricht

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

jtl/nachricht
=============

Nachricht is a distributed event queue system

0.19.6(8mo ago)135.0k↑75%[4 PRs](https://github.com/jtl-software/nachricht/pulls)1MITPHPPHP 8.1.\* || 8.2.\* || 8.3.\* || 8.4.\*CI passing

Since Jun 4Pushed 2mo ago3 watchersCompare

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

READMEChangelog (10)Dependencies (12)Versions (59)Used By (1)

[![Testing](https://github.com/jtl-software/nachricht/workflows/Testing/badge.svg)](https://github.com/jtl-software/nachricht/workflows/Testing/badge.svg)

Nachricht
=========

[](#nachricht)

Nachricht is a message dispatcher which focuses on distributing workloads.

Features
--------

[](#features)

- Directly dispatch messages
- Dispatch messages via AMQP
- auto-discovery to find and create AMQP Messages queues
- dead-lettering mechanism

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

[](#requirements)

A PSR-11 compatible container (we recommend the [Symfony DependencyInjection component](https://symfony.com/doc/current/components/dependency_injection.html)) is required. The instances of listeners will be obtained from the container via `$container->get($listenerClass)`.

The RabbitMQ [delayed message exchange plugin](https://github.com/rabbitmq/rabbitmq-delayed-message-exchange) may be installed before using Nachricht to make sure you can work with message delay.

Usage
-----

[](#usage)

Create an message class by implementing `JTL\Nachricht\Contract\Message\Message`.

```
use JTL\Nachricht\Contract\Message\Message;

class DummyMessage implements Message
{
    private string $data;

    public function __construct(string $data)
    {
        $this->data = $data;
    }

    public function getData(): string
    {
        return $this->data;
    }
}
```

Create a listener class by implementing `JTL\Nachricht\Contract\Listener\Listener`

```
use JTL\Nachricht\Contract\Listener\Listener;

class DummyListener implements Listener
{
    public function listen(DummyMessage $event): void
    {
        echo 'Dummy Listener called: ' . $event->getData() . "\n";
    }
}
```

Emit the Event

```
$emitter = $container->get(DirectEmitter::class);

$event = new FooMessage('Test');

$emitter->emit($event);
```

Output

```
# php examples/DirectEmit/DirectEmit.php
FooListener called: Test
```

Emit delayed messages
---------------------

[](#emit-delayed-messages)

A delay can be used to make a message invisible for the consumer until a defined time is reached. There are two types of delay available

On message construct: delay a message when it is getting emitted. You can specify such a delay (in seconds) when constructing a new message instance.

```
$event = new DelayedDummyAmqpMessage(data: 'Test', delay: 3);
$emitter->emit($event);
```

To specify a retry delay overwrite method `getRetryDelay(): int` method (default retry delay is set to 3 seconds). Such delay will be used every time a Listener facing an Error when cause jtl/nachricht to re-queue the message

You can find more examples in the `example` directory.

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance75

Regular maintenance activity

Popularity29

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~136 days

Total

39

Last Release

257d ago

PHP version history (8 changes)0.4.0PHP ^7.4

0.13.0PHP ^7.4|8.0.\*

0.14.0PHP 8.0.\*|8.1.\*

0.16.1PHP 8.1.\*

0.19.1PHP 8.1.\*|8.2.0

0.19.2PHP 8.1.\* || 8.2.\*

0.19.3PHP 8.1.\* || 8.2.\* || 8.3.\*

0.19.6PHP 8.1.\* || 8.2.\* || 8.3.\* || 8.4.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/301782761df83e7af1629dc65f40b2963c0f91e2d56bbace84336d89187adb29?d=identicon)[jtlgmbh](/maintainers/jtlgmbh)

![](https://www.gravatar.com/avatar/38c22ffd540333580cddea1fb869a3f32e5ffd1cadc4b06e84eb2f01658ce961?d=identicon)[eazyAuctionDev](/maintainers/eazyAuctionDev)

---

Top Contributors

[![sleipi](https://avatars.githubusercontent.com/u/1415186?v=4)](https://github.com/sleipi "sleipi (40 commits)")[![Das-Ente](https://avatars.githubusercontent.com/u/20517536?v=4)](https://github.com/Das-Ente "Das-Ente (23 commits)")[![BrandtM](https://avatars.githubusercontent.com/u/20184278?v=4)](https://github.com/BrandtM "BrandtM (13 commits)")[![KaiSchwendig](https://avatars.githubusercontent.com/u/162550565?v=4)](https://github.com/KaiSchwendig "KaiSchwendig (5 commits)")[![JTLMarggx](https://avatars.githubusercontent.com/u/227163495?v=4)](https://github.com/JTLMarggx "JTLMarggx (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![spopp-jtl](https://avatars.githubusercontent.com/u/169648597?v=4)](https://github.com/spopp-jtl "spopp-jtl (1 commits)")

---

Tags

eventmessage-broker

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jtl-nachricht/health.svg)

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

###  Alternatives

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)

PHPackages © 2026

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