camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jburkhardt <>
Subject stopping a route in spring dsl
Date Thu, 30 Apr 2009 20:13:32 GMT

I've looked around JIRA and it seems using stop in spring dsl used to be an
issue but has been resolved since Feb 09.  Perhaps I am attempting to use it
I am using Camel 2.0 M1

Here's what I'm trying to do:
I have a route that receives messages from a JMS queue.
After receiving the message it is run through a splitter, each "sub-message"
for lack of a better term, gets run through a validation process and a
security process.  The results are then aggregated back together and
continue on the route.

Here is what I'm doing now in my spring dsl:
  <camel:split strategyRef="myAggregationStrategyBean">
    <camel:process ref="validationProcessor"/>
    <camel:process ref="securityProcessor"/>	

Right now this works okay - I set an exception on the exchange in the
validation or security process if it fails, and it does not get past the
My issue is if it fails the validation process, I don't want it to even
bother going to the security process, let alone to the aggregator after
that.  Likewise if it fails security I don't want the aggregator to be
Is this something that is possible?  Or is there some better way to
accomplish what I am trying to do?

I have tried defining an interceptor like this:
    <simple>${exception.message} != null</simple>

Hoping that the interceptor would pick when I had set an exception on the
exchange and stop the route.  This doesn't seem to have any effect.  The
aggregator is still called every time.

Any help, especially if I am trying to do something completely the wrong
way, would be much appreciated.
View this message in context:
Sent from the Camel - Users (activemq) mailing list archive at

View raw message