Example usage for org.springframework.amqp.rabbit.retry RepublishMessageRecoverer RepublishMessageRecoverer

List of usage examples for org.springframework.amqp.rabbit.retry RepublishMessageRecoverer RepublishMessageRecoverer

Introduction

In this page you can find the example usage for org.springframework.amqp.rabbit.retry RepublishMessageRecoverer RepublishMessageRecoverer.

Prototype

public RepublishMessageRecoverer(AmqpTemplate errorTemplate, String errorExchange) 

Source Link

Usage

From source file:com.nkapps.billing.configs.RabbitMQConfig.java

@Bean
public RetryOperationsInterceptor retryInterceptor() {
    RepublishMessageRecoverer recoverer = new RepublishMessageRecoverer(new RabbitTemplate(connectionFactory()),
            pgErrorExchangeName());// w  w w.  j a va2  s. c  o m
    return RetryInterceptorBuilder.stateless().maxAttempts(3).recoverer(recoverer).build();
}