Class JpaSequencedDeadLetterQueue<M extends EventMessage>

java.lang.Object
org.axonframework.messaging.eventhandling.deadletter.jpa.JpaSequencedDeadLetterQueue<M>
Type Parameters:
M - An implementation of Message contained in the dead-letters within this queue.
All Implemented Interfaces:
SequencedDeadLetterQueue<M>

public class JpaSequencedDeadLetterQueue<M extends EventMessage> extends Object implements SequencedDeadLetterQueue<M>
JPA-backed implementation of the SequencedDeadLetterQueue, used for storing dead letters containing EventMessages durably as a DeadLetterEntry.

Keeps the insertion order intact by saving an incremented index within each unique sequence, backed by the DeadLetterEntry.getSequenceIndex() property. Each sequence is uniquely identified by the sequence identifier, stored in the DeadLetterEntry.getSequenceIdentifier() field.

When processing an item, single execution across all applications is guaranteed by setting the DeadLetterEntry.getProcessingStarted() property, locking other processes out of the sequence for the configured claimDuration (30 seconds by default).

The stored entries are converted to a JpaDeadLetter when they need to be processed or filtered. In order to restore the original EventMessage the configured DeadLetterJpaConverter is used. The default EventMessageDeadLetterJpaConverter supports all EventMessage implementations provided by the framework.

invalid reference
upcasters
are not supported by this implementation, so breaking changes for events messages stored in the queue should be avoided.
Since:
4.6.0
Author:
Mitchell Herrijgers