camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garry <>
Subject Handling JBI faults
Date Thu, 21 Aug 2008 15:07:17 GMT


I'd like my error handling configuration to apply equally to both faults and 
exceptions. This (slightly-snipped) Camel configuration:

routes to a servicemix-bean that, optionally, asserts a fault:

  Fault fault = exchange.createFault();
  fault.setContent(new StringSource("my test fault"));
where the 'exchange' is 'javax.jbi.messaging.MessageExchange'. If the bean 
faults, I want Camel to retry the endpoint per the error handling 
configuration and, if successful on a retry, abort further error handling. 
What seems to be happening instead is that once a fault is returned, the 
configured maximum number of retries is *always* performed even if a 
subsequent retry is successful (i.e., the target endpoint does *not* fault
returns normally). It looks like the error/fault handler doesn't see the
recent response. Once the full retry cycle completes, the message is routed 
to the configured DLC (not shown above).

Am I using method 'handleFault' correctly? Is there a better way to handle 
this use case? If there's an 'errorHandler' method, why isn't there a 
corresponding 'faultHandler' method?

Versioning. I'm using FUSE which bundles FUSE Mediation Router
'' which does contain Camel-538, the one relevant fault-handling 
JIRA I could find.

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

View raw message