Skip to content

Commit

Permalink
Emphasize that only a single DeadLetter sequence is processed
Browse files Browse the repository at this point in the history
Emphasize that only a single DeadLetter sequence is processed through
the process operations on the SequencedDeadLetterProcessor and
SequencedDeadLetterQueue.

#2021
  • Loading branch information
smcvb committed Aug 31, 2022
1 parent 29510d1 commit eb8a155
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public interface SequencedDeadLetterProcessor<M extends Message<?>> {
/**
* Process a sequence of {@link DeadLetter dead-letters} matching the given {@code sequenceFilter}.
* <p>
* Note that the {@code sequenceFilter} is <em>only</em> invoked for the first letter of a sequence, as the first
* entry blocks the entire sequence.
* Note that only a <em>single</em> matching sequence is processed! Furthermore, the {@code sequenceFilter} is
* <em>only</em> invoked for the first letter of a sequence, as the first entry blocks the entire sequence.
*
* @param sequenceFilter A filter for the first {@link DeadLetter dead-letter} entries of each sequence.
* @return {@code true} if at least one {@link DeadLetter dead-letter} was processed successfully, {@code false}
Expand All @@ -30,6 +30,8 @@ public interface SequencedDeadLetterProcessor<M extends Message<?>> {

/**
* Process any sequence of {@link DeadLetter dead-letters} belonging to this component.
* <p>
* Note that only a <em>single</em> matching sequence is processed!
*
* @return {@code true} if at least one {@link DeadLetter dead-letter} was processed successfully, {@code false}
* otherwise.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ void requeue(@Nonnull DeadLetter<? extends M> letter,
* the {@code sequenceFilter}. Will pick the oldest available sequence based on the {@link DeadLetter#lastTouched()}
* field from every sequence's first entry.
* <p>
* Note that only the first dead-letter is validated, because it is the blocker for the processing of the rest of
* the sequence.
* Note that only a <em>single</em> matching sequence is processed! Furthermore, only the first dead-letter is
* validated, because it is the blocker for the processing of the rest of the sequence.
* <p>
* Uses the {@link EnqueueDecision} returned by the {@code processingTask} to decide whether to
* {@link #evict(DeadLetter)} or {@link #requeue(DeadLetter, UnaryOperator)} a dead-letter from the selected
Expand Down Expand Up @@ -227,6 +227,8 @@ boolean process(@Nonnull Predicate<DeadLetter<? extends M>> sequenceFilter,
* the oldest available sequence based on the {@link DeadLetter#lastTouched()} field from every sequence's first
* entry.
* <p>
* Note that only a <em>single</em> matching sequence is processed!
* <p>
* Uses the {@link EnqueueDecision} returned by the {@code processingTask} to decide whether to
* {@link #evict(DeadLetter)} or {@link #requeue(DeadLetter, UnaryOperator)} the dead-letter. The
* {@code processingTask} is invoked as long as letters are present in the selected sequence and the result of
Expand Down

0 comments on commit eb8a155

Please sign in to comment.