Hi,
I'd like my error handling configuration to apply equally to both faults and
exceptions. This (slightly-snipped) Camel configuration:
from("jbi:endpoint:http://my/fault/test")
.errorHandler(maximumRedeliveries(4))
.handleFault()
.to("jbi:endpoint:http://my/jbi/bean")
routes to a servicemix-bean that, optionally, asserts a fault:
...
Fault fault = exchange.createFault();
fault.setContent(new StringSource("my test fault"));
exchange.setFault(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
but
returns normally). It looks like the error/fault handler doesn't see the
most
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 3.3.1.3 which bundles FUSE Mediation Router
Version
'1.4.0.0-fuse' which does contain Camel-538, the one relevant fault-handling
JIRA I could find.
Thanks, Garry
--
View this message in context:
http://www.nabble.com/Handling-JBI-faults-tp19090487s22882p19090487.html
Sent from the Camel - Users mailing list archive at Nabble.com.