@Bean
public StatefulRetryOperationsInterceptor interceptor() {
return RetryInterceptorBuilder.stateful()
.maxAttempts(5)
.backOffOptions(1000, 2.0, 10000)
.build();
}
我们可以用这个bean来做spring-rabbitmq自动恢复吗,因为spring rabbit不支持
factory.setAutomaticRecoveryEnabled(true);
factory.setNetworkRecoveryInterval(10000);