You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by contactreji <co...@gmail.com> on 2015/04/22 13:27:00 UTC

OnException - Retry based on Body Content

Hi

I have a requirement where I am pushing some data to external system using
http component.

The external system may return following json responses along with http
status codes.


{"Status":"OK"}
or
{"ErrorCode":"HEMSUSERS0001"} with http status 400
or
{"ErrorCode":"HEMSUSERS9999"} with http status 400

Now I want my exception handler to retry only in case my body has
HEMSUSERS9999.

In case Its HEMSUSERS0001, I simply want my flow to continue to my exception
handling steps.

Do we have something in camel to implement above functionality in
ExceptionHandlers?


- Reji 



-----
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel & Jboss Fuse ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: http://camel.465427.n5.nabble.com/OnException-Retry-based-on-Body-Content-tp5766153.html
Sent from the Camel - Users mailing list archive at Nabble.com.

AW: OnException - Retry based on Body Content

Posted by "Jan Matèrne (jhm)" <ap...@materne.de>.
If I see that right, the exception handling is just a normal route, so you
could a content based router.

Jan


> -----Ursprüngliche Nachricht-----
> Von: contactreji [mailto:contactreji@gmail.com]
> Gesendet: Mittwoch, 22. April 2015 13:27
> An: users@camel.apache.org
> Betreff: OnException - Retry based on Body Content
> 
> Hi
> 
> I have a requirement where I am pushing some data to external system
> using http component.
> 
> The external system may return following json responses along with http
> status codes.
> 
> 
> {"Status":"OK"}
> or
> {"ErrorCode":"HEMSUSERS0001"} with http status 400 or
> {"ErrorCode":"HEMSUSERS9999"} with http status 400
> 
> Now I want my exception handler to retry only in case my body has
> HEMSUSERS9999.
> 
> In case Its HEMSUSERS0001, I simply want my flow to continue to my
> exception handling steps.
> 
> Do we have something in camel to implement above functionality in
> ExceptionHandlers?
> 
> 
> - Reji
> 
> 
> 
> -----
> Reji Mathews
> Sr. Developer - Middleware Integration / SOA ( Open Source - Apache
> Camel & Jboss Fuse ESB | Mule ESB ) LinkedIn -
> http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
> Twitter - reji_mathews
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/OnException-Retry-based-on-Body-
> Content-tp5766153.html
> Sent from the Camel - Users mailing list archive at Nabble.com.