The Leitstand Event Queue is a transactional persistent message queue. A domain event gets persisted in the queue if the transaction that issued the event was committed. Consequently no event is stored if the transaction roles back.
The DomainEvent
is merely an envelope to convey the actual payload.
The payload must be provided in JSON format.
An event contains the following properties:
- event ID, a unique message ID in UUIDv4 format
- event name, a descriptive event name (e.g.
ElementAddedEvent
,ElementRemovedEvent
) - correlation ID, an optional ID to correlate a message with a running process. This allows a process to wait for a certain message before it proceeds.
- topic, the topic to which the message is assigned
- message, the JSON payload
- creation date, the timestamp when the event was created
Messages are grouped by topics. Each message is associated to exactly one topic.
The EventQueueService
provides the API to send domain events and query the event queue.