You could also use a CBR and look at the "priority" header and look for any
priority greater 1 to B otherwise to A.

On Mon, Jul 25, 2016 at 7:21 AM, Vitalii Tymchyshyn <v...@tym.im> wrote:

> Do you want to do this once? In this case the easiest is just to put a
> @RoutingSlip bean that will switch its state after first message.
>
> Пн, 25 лип. 2016 03:29 користувач sheikhisham <sheikhisha...@gmail.com>
> пише:
>
> > I want to reorder a sequence of messages and dynamically route the
> messages
> > according to their order after resequencing. Say, first message after
> > resequencing should be routed to A, and others to route B.
> >
> > I was able to reorder messages using resequencer, but how do I
> dynamically
> > route the first message alone to a particular route after resequencing?
> Any
> > help would be much appreciated.
> >
> > from(CAMEL_DIRECT_REORGANISE_MSGS)
> >
>  .resequence(header("priority")).batch().timeout(resequencerTimeout
> > *
> > 1000).size(3).reverse()
> >         .to("direct:A");
> >
> > In above route, all messages out of resequencer flows to RouteA, but I
> want
> > first message alone to flow to RouteA and the rest to RouteB.
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Dynamic-routing-after-Resequencing-messages-tp5785415.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>

Reply via email to