Download the PHP package jtl/nachricht without Composer
On this page you can find all versions of the php package jtl/nachricht. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jtl/nachricht
More information about jtl/nachricht
Files in jtl/nachricht
Package nachricht
Short Description Nachricht is a distributed event queue system
License MIT
Informations about the package nachricht
Nachricht
Nachricht is a message dispatcher which focuses on distributing workloads.
Features
- Directly dispatch messages
- Dispatch messages via AMQP
- auto-discovery to find and create AMQP Messages queues
- dead-lettering mechanism
Requirements
A PSR-11 compatible container (we recommend the Symfony DependencyInjection component)
is required. The instances of listeners will be obtained from the container
via $container->get($listenerClass)
.
The RabbitMQ delayed message exchange plugin may be installed before using Nachricht to make sure you can work with message delay.
Usage
Create an message class by implementing JTL\Nachricht\Contract\Message\Message
.
Create a listener class by implementing JTL\Nachricht\Contract\Listener\Listener
Emit the Event
Output
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.
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.
All versions of nachricht with dependencies
ext-json Version *
ext-pcntl Version *
jtl/php-generic-collection Version ^1.0.0
nikic/php-parser Version ^4.18.0
psr/container Version ^2.0.2
psr/event-dispatcher Version ^1.0
psr/log Version ^3.0
ramsey/uuid Version ^4.7.5
symfony/config Version ^6.4.4