org.springframework.amqp.rabbit.config.RetryInterceptorBuilder Java Examples

The following examples show how to use org.springframework.amqp.rabbit.config.RetryInterceptorBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RabbitMQRouterConfig.java    From konker-platform with Apache License 2.0 5 votes vote down vote up
@Bean
public RetryOperationsInterceptor interceptor() {
    return RetryInterceptorBuilder.stateless()
            .maxAttempts(5)
            .backOffOptions(1000, 2.0, 5000)
            .build();
}
 
Example #2
Source File: RabbitSourceConfiguration.java    From spring-cloud-stream-app-starters with Apache License 2.0 5 votes vote down vote up
@Bean
public RetryOperationsInterceptor rabbitSourceRetryInterceptor() {
	return RetryInterceptorBuilder.stateless()
			.maxAttempts(this.properties.getMaxAttempts())
			.backOffOptions(this.properties.getInitialRetryInterval(), this.properties.getRetryMultiplier(),
					this.properties.getMaxRetryInterval())
			.recoverer(new RejectAndDontRequeueRecoverer())
			.build();
}
 
Example #3
Source File: RabbitConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public RetryOperationsInterceptor retryInterceptor() {
    return RetryInterceptorBuilder.stateless()
        .backOffOptions(1000, 3.0, 10000)
        .maxAttempts(5)
        .recoverer(observableRecoverer())
        .build();
}