Interface EnqueuePolicy<M extends Message>
- Type Parameters:
M- An implementation ofMessagecontained in thedead letterthat will be decided on through this policy.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface constructing an
EnqueueDecision based on a dead letter and
cause. Should be used by components that insert dead letters into and processes dead letters from a
SequencedDeadLetterQueue.
Implementers of a policy can use Decisions to construct the basic types of EnqueueDecision.
- Since:
- 4.6.0
- Author:
- Steven van Beelen
- See Also:
-
Method Summary
-
Method Details
-
decide
Constructs aEnqueueDecisionbased on the givenletterandcause. This operation is typically invoked when handling aMessagefailed and a decision should be made what to do with it.Implementers of this operation can use
Decisionsto construct the basic types ofEnqueueDecision.- Parameters:
letter- Thedead letterimplementation to make a decision on.cause- TheThrowablecausing the givenletterto be decided on.- Returns:
- The decision used to decide what to do with the given
letter.
-