Class DeadLetteringEventHandlingComponent

java.lang.Object
org.axonframework.messaging.eventhandling.DelegatingEventHandlingComponent
org.axonframework.messaging.eventhandling.deadletter.DeadLetteringEventHandlingComponent
All Implemented Interfaces:
DescribableComponent, MessageHandler, SequencedDeadLetterProcessor<EventMessage>, EventHandler, EventHandlingComponent, ReplayStatusChangedHandler, ResetHandler

public class DeadLetteringEventHandlingComponent extends DelegatingEventHandlingComponent implements SequencedDeadLetterProcessor<EventMessage>
An EventHandlingComponent decorator that uses a SequencedDeadLetterQueue to enqueue events for which handling failed.

Uses an EnqueuePolicy to decide whether a failed event should be enqueued. Subsequent events belonging to an already enqueued "sequence identifier" are also enqueued to maintain event ordering in the face of failures.

This component provides operations to SequencedDeadLetterProcessor.processAny() dead letters it has enqueued through the SequencedDeadLetterProcessor contract. It ensures the same delegate EventHandlingComponent is used when processing dead letters as with regular event handling. Each dead letter is processed in its own UnitOfWork, providing proper transaction boundaries.

Since:
4.6.0
Author:
Steven van Beelen, Mitchell Herrijgers, Mateusz Nowak
See Also: