Interface SequencedDeadLetterProcessor<M extends Message<?>>
- Type Parameters:
M- An implementation ofMessagecontained in the processeddead letters.
- All Known Implementing Classes:
DeadLetteringEventHandlerInvoker
public interface SequencedDeadLetterProcessor<M extends Message<?>>
Contract describing a component that can process
dead letters that it has enqueued.
Should use the SequencedDeadLetterQueue for processing as this ensures dead lettered Messages
are kept in sequence. Thus processed in order through this component.
- Since:
- 4.6.0
- Author:
- Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescriptionbooleanprocess(Predicate<DeadLetter<? extends M>> sequenceFilter) Process a sequence ofdead lettersmatching the givensequenceFilter.default booleanProcess any sequence ofdead lettersbelonging to this component.
-
Method Details
-
process
Process a sequence ofdead lettersmatching the givensequenceFilter.Note that only a single matching sequence is processed! Furthermore, the
sequenceFilteris only invoked for the first letter of a sequence, as the first entry blocks the entire sequence.- Parameters:
sequenceFilter- A filter for the firstdead letterentries of each sequence.- Returns:
trueif at least onedead letterwas processed successfully,falseotherwise.
-
processAny
default boolean processAny()Process any sequence ofdead lettersbelonging to this component.Note that only a single matching sequence is processed!
- Returns:
trueif at least onedead letterwas processed successfully,falseotherwise.
-