org.springframework.amqp.rabbit.retry
Class MissingMessageIdAdvice
java.lang.Object
org.springframework.amqp.rabbit.retry.MissingMessageIdAdvice
- All Implemented Interfaces:
- org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor
public class MissingMessageIdAdvice
- extends java.lang.Object
- implements org.aopalliance.intercept.MethodInterceptor
Advice that can be placed in the listener delegate's advice chain to
enhance the message with an ID if not present.
If an exception is caught on a redelivered message, rethrows it as an AmqpRejectAndDontRequeueException
which signals the container to NOT requeue the message (otherwise we'd have infinite
immediate retries).
If so configured, the broker can send the message to a DLE/DLQ.
Must be placed before the retry interceptor in the advice chain.
- Since:
- 1.1.2
|
Constructor Summary |
MissingMessageIdAdvice(org.springframework.retry.policy.RetryContextCache retryContextCache)
|
|
Method Summary |
java.lang.Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MissingMessageIdAdvice
public MissingMessageIdAdvice(org.springframework.retry.policy.RetryContextCache retryContextCache)
invoke
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
throws java.lang.Throwable
- Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
- Throws:
java.lang.Throwable