Hi,

I took an *ugly* approach.
Capture the HTTP exception (OnExeption) - then find out what type of
ShatusCode it is.
If its between 400..499 then just simply log the exception, if Status Code
is between 500..599 then i manually publish the message back into my
ActiveMQ Queue (for camel to again pull the message and make the HTTP call)
This goes into a loop with a maxRetry of 5 and on the 5th attempt I simply
log the 500..599 exception. 

I do get the expected functionality bu 
Would need to revisit this at a later point in time to make it more
efficient.



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-use-throwExceptionOnFailure-false-to-differentiate-HTTP-Status-codes-tp5727591p5727855.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to