Hi,
Isn't the behaviour of the splitter that the it splits the message and not the
exchange, therefore the message is split at the point of the call put on hold
whilst all the messages are sent to localSmsDeliveryEntry. Once this process is
complete the single message is allowed to cotinue, in this case to nowhere and
so onExchangeDone is called? To have multiple onExchangeDone calls triggered
you would need to have multiple Exchanges. At least this is my understanding.
hope this helps,
Graham
<camel:route id="routeLegacyDestinationEntry"
routePolicyRef="loggingRoutePolicy">
<camel:from ref="legacyDestinationEntry" />
<camel:to uri="bean://legacyDestinationConsumer?method=process" />
<camel:split parallelProcessing="true" streaming="true">
<camel:simple>${body.envelopeList}</camel:simple>
<camel:to ref="localSmsDeliveryEntry" />
</camel:split>
</camel:route>
> Date: Wed, 29 Aug 2012 12:47:12 -0700
> From: [email protected]
> To: [email protected]
> Subject: RoutePolicy + Split
>
> Hy guys
>
> I wrote the route below to perform this behavior:
> 1) call onExchangeBegin once
> 2) call onExchangeDone /body.envelopeList.size()/ times
>
> <camel:route id="routeLegacyDestinationEntry"
> routePolicyRef="loggingRoutePolicy">
> <camel:from ref="legacyDestinationEntry" />
> <camel:to uri="bean://legacyDestinationConsumer?method=process" />
> <split parallelProcessing="true" streaming="true">
> <simple>${body.envelopeList}</simple>
> <to ref="localSmsDeliveryEntry" />
> </split>
> </camel:route>
>
> But the current behavior is:
> 1) call onExchangeBegin once
> 2) call onExchangeDone once
>
> If the *<to ref="localSmsDeliveryEntry" />* is the last "to" in the route,
> why onExchangeDone is not called /body.envelopeList.size()/ times?
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/RoutePolicy-Split-tp5718325.html
> Sent from the Camel - Users mailing list archive at Nabble.com.