M
- An implementation of Message
contained in the dead letter
that will be decided
on through this policy.@FunctionalInterface public interface EnqueuePolicy<M extends Message<?>>
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
.
Decisions
Modifier and Type | Method and Description |
---|---|
EnqueueDecision<M> |
decide(DeadLetter<? extends M> letter,
Throwable cause)
|
EnqueueDecision<M> decide(DeadLetter<? extends M> letter, Throwable cause)
EnqueueDecision
based on the given letter
and cause
. This operation is
typically invoked when handling a Message
failed and a decision should be made what to do with it.
Implementers of this operation can use Decisions
to construct the basic types of
EnqueueDecision
.
letter
- The dead letter
implementation to make a decision on.cause
- The Throwable
causing the given letter
to be decided on.letter
.Copyright © 2010–2023. All rights reserved.