The onConsume is run when the exchange is complete at the end,
whatever that means routing over threads and whatnot.

If you want to break up your route into 2 lets, then consider using
wire-tap to fork of a separeted copy that is indepdenent.



On Thu, Apr 7, 2016 at 12:12 PM, onders <[email protected]> wrote:
> Hmm.. I think i misunderstood the route conceptually.
>
> What i thought was that below is a single route;
>
> from("sql:select rowid vrowid from myTable where nstatus = 0?outputClass=" +
> MyBean.class.getName()
>                 + "&onConsume=update myTable set nstatus = 1 where rowid =
> :#${body.getVrowid()}")
>
> .routeId("mySimpleRoute").threads(5).to("direct:generateLine").end();
>
>
> and the exchange becomes complete when we do
>
> ...
> ...
> // piece of code above
> .to("direct:generateLine").end();
>
> and another route is
>
> from("direct:generateLine").process(new
> LineGenerator()).to("amq:queue:jms.simpleQueue");
>
> So i expected onConsume receives MyBean as the body of exchange;
> But you are saying that exhange is complete after this line
>
>>> from("direct:generateLine").process(new
>>> LineGenerator()).to("amq:queue:jms.simpleQueue");
>
> so onConsume receives whatever is set as the body of exchange in the
> instance of LineGenerator.
>
> I think i am confused?
>
> Could you please help me understand what makes up the route?
>
> Regards
> Önder
>
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/DefaultSqlPrepareStatementStrategy-lookupParameter-when-onConsume-used-in-SQL-component-tp5780437p5780663.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to