camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vanshul.Chawla <Vanshul.Cha...@target.com>
Subject Camel onException for different HTTP error codes
Date Mon, 04 May 2015 11:56:10 GMT
We have a requirement wherein we need to do different error handling for different error code
returned from http external service.

So we have to go for a retry for

"X-Original-HTTP-Status-Code"=404,405,500,401

And no retry for other codes.

What I have learnt so far is onException will do selective handling but that limits to a class
only. And here class will be same.

Other option I thought of is setting throwExceptionOnFailure but here I lose the exception
and it behaves like a handled response.


Can anyone suggest me with an example on how this can be done in Camel Spring DSL?

Thanks and Regards,

Vanshul Chawla


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message