All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tradeshift.amqp.annotation.EnableRabbitRetryAndDlq Maven / Gradle / Ivy

Go to download

This library was created to make it easier to configure RabbitMQ within Spring and to establish a pattern for queues architecture.

There is a newer version: 0.1.3
Show newest version
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