I have configured the re delivery related properties as follows. In fact, I wanted to retry only for HTTP Code 500x series. But I see that onException() takes only exception type. How to achieve this? My application is spring boot & camel based.
errorHandler(defaultErrorHandler().maximumRedeliveries(3).redeliveryDelay(5000).logRetryAttempted(true).logExhausted(true));
onException().retryAttemptedLogLevel(LoggingLevel.WARN)
Camel 2.23 is the version I am using(As per the comment).
Need more information, how you get resp code.
if you get response from camel route you can add condition in route: