camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nestor Urquiza <>
Subject Re: Best practice to parse JSON response and retry if error
Date Tue, 22 May 2012 21:33:51 GMT
Thank you guys! That did the trick.

Using a direct route with noErrorHandler() encapsulating all the logic and
calling it from the route that will perform the retries works as expected.
        .log(LoggingLevel.DEBUG, LOG_NAME, "Received message in queue
sample: id = ${id}")
        .unmarshal().json(JsonLibrary.Jackson, ShellResponse.class)
        .process(new ShellProcessor())

The disadvantage is that in a chained Services process (Service
Orchestration) several routes will be needed just to accomplish retries per
each service that fails.

I think for Service Orchestration I rather try to use a bean that invokes
each http service, analyze the response and throws Exception if error. That
way we need only one route which looks cleaner to me:

- Nestor

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message