camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Gardner <>
Subject StopOnException and Conditional Wiretapping
Date Wed, 04 Sep 2013 16:34:39 GMT
I have a splitter/streaming route that sends chunks of data to a downstream
route.  It has a bean that processes the split data and uses a
ProducerTemplate to send that processed split data.  If the downstream
route has a problem, I'd like to stop the splitting process.  I understand
that if an exception is raised on the downstream route, the only way for my
splitter route bean will know is to check the returned exchange for an
exception or some indicator that an exception occurred on that downstream

Here's what I'd like to do, if possible:

1. Halt streaming when a problem occurs in the downstream route.  My
splitter route can be configured with stopOnException.  The bean that uses
the ProducerTemplate can check the Exchange for an error and throw its own
exception, stopping the split.

2.  If the bean that uses the ProducerTemplate has its own problems
processing data (before it calls the ProducerTemplate), I'd like to stop
the route.  That bean can throw an exception in this situation, stopping
the split.  The difference here is I'd like to wiretap to one route if the
bean has no problems processing (before it hits the ProducerTemplate) and
wiretap to another if the bean does have problems.

Any thoughts on how to do something like that?

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