Interface SequencedDeadLetterProcessor<M extends Message<?>>

Type Parameters:
M - An implementation of Message contained in the processed dead 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 Type
    Method
    Description
    boolean
    process(Predicate<DeadLetter<? extends M>> sequenceFilter)
    Process a sequence of dead letters matching the given sequenceFilter.
    default boolean
    Process any sequence of dead letters belonging to this component.
  • Method Details

    • process

      boolean process(Predicate<DeadLetter<? extends M>> sequenceFilter)
      Process a sequence of dead letters matching the given sequenceFilter.

      Note that only a single matching sequence is processed! Furthermore, the sequenceFilter is only invoked for the first letter of a sequence, as the first entry blocks the entire sequence.

      Parameters:
      sequenceFilter - A filter for the first dead letter entries of each sequence.
      Returns:
      true if at least one dead letter was processed successfully, false otherwise.
    • processAny

      default boolean processAny()
      Process any sequence of dead letters belonging to this component.

      Note that only a single matching sequence is processed!

      Returns:
      true if at least one dead letter was processed successfully, false otherwise.