
com.tradeshift.amqp.annotation.EnableRabbitRetryAndDlq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-rabbitmq-tuning-lib Show documentation
Show all versions of spring-rabbitmq-tuning-lib Show documentation
This library was created to make it easier to configure RabbitMQ within Spring and to establish a
pattern for queues architecture.
package com.tradeshift.amqp.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Exceptions checking order:
*
*
* - Should be discarded
* - Should be sent to retry
* - Should be sent to DLQ
* - Otherwise discard
*
*
* The discardWhen
attribute has higher precedence over exceptions
attribute.
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface EnableRabbitRetryAndDlq {
String event();
/**
* Define if the exception check should use 'instanceof' operator.
*/
boolean checkInheritance() default true;
/**
* Exceptions to ignore and just discard the message.
*/
Class[] discardWhen() default {};
/**
* Exceptions to verify if the message should be sent to retry.
* If the number of retries is exceeded the message will be sent to DLQ.
*/
Class[] retryWhen() default { Exception.class };
/**
* Exceptions to verify if the message should be sent to DLQ.
*/
Class[] directToDlqWhen() default {};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy