camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deepak_a <angesh...@gmail.com>
Subject Re: How to use throwExceptionOnFailure=false to differentiate HTTP Status codes
Date Wed, 20 Feb 2013 09:22:47 GMT
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.

Mime
View raw message