Edwin, I'm not sure whether I got your scenario in the right way.
Is it possible to share your route? Do you execute the DB insert/update in
the same thread or asynchronously?

What's with something like:
from("sead:start")
  .transacted()
  .multicast(aggregationStrategyWhichReturnsTheFirstExchange)
    .to("bean:someProcessor", "direct:insertDBRoute")
  .end()
  .multicast()
    .to("jms:topic:end", "direct:updateDBRoute")
  .end();

from("direct:insertDBRoute")
  ...
  .to("sql/jdbc");

from("direct:updateDBRoute")
  ...
  .to("sql/jdbc");

I think you need a transacted route to achieve this.

Best,
Christian

On Fri, Nov 9, 2012 at 11:20 AM, Edwin <edwin.rabbi...@gmail.com> wrote:

> Hi Folks,
>
> I have a route that consumes from a seda endpoint, sends the exchange to a
> processor and then to jms topic.
>
> I need to persist the message in a DB after I send the exchange to the
> processor. After the message has made it to the topic - I take another trip
> to the DB to update a status flag on the persisted message
>
> I need high throughput on this route and since I have two DB operations -
> it
> is not feasible to execute these tasks synchronously. To remedy this, I
> have
> placed two wiretaps on the route -
>
> Wiretap1 - does inital insert
> Wiretap2 - updates status flag on inserted message
>
> Since, I always want the insert to happen before the update - I have
> created
> a shared thread pool that both wiretap's use. The thread pool has max size
> of 1 with an unbounded queue size.
>
> When I run the route - I see that the ordering of the inserts and updates
> are not sequential order as I would have expected. Would folks have any
> insight into why this would be happening?
>
> Is having multiple wiretaps on a route dangerous?
>
> Any insights are much appreciated
>
> Thanks,
> Edwin
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Multiple-Wiretap-s-in-a-Camel-Route-tp5722390.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Reply via email to