spring amqp enable retry by configuration and prevent it according to a specified exception
I have the following two cases In case of ExceptionA : retrying for finite number of times and finally when number of retrials exhausted, message is written in a dead letter queue In case of ExceptionB : simply, message should be written to dead letter queue I want to support the two cases on the same listener container factory and the same queue. I already have the following configuration to support case 1 successfully: @Bean public RetryOperationsInterceptor workMessagesRetryInterceptor() { return RetryInterceptorBuilder.stateless() .maxAttempts(5) .backOffOptions(1000, 2, 10000) .recoverer