Actually, you should be able to use a RoutePolicy to accomplish this:

from("jms:queue").routePolicy(customPolicy).to(...) continue route ...

http://camel.apache.org/routepolicy.html

In the onExchangeBegin() method, do not allow the processing to continue
(block) until the "world has been constructed"


On Thu, Aug 15, 2013 at 9:30 AM, nigel <nigel.long...@pimco.com> wrote:

> This is a common pattern I've seen before. It's not practical to have
> persistent queues/topics with each update to the database table being
> stored
> due to the transient nature of the consumer population (number of consumers
> is variable and their liveliness has no pattern). As Mark points out you
> need to subscribe to updates, buffer them, get the current 'view of the
> world' from the authoritative source (ie the database) and then let the
> updates flow in - potentially discarding duplicates at the start which were
> already in the image due to the timing.
> So in camel how can we start a 'route' so that it registers the
> subscription
> but 'pause' it whilst we get the table? It seems like we might need three
> routes and some funky 'on/off' tap logic. I don't see an EIP that supports
> this.
> Nigel
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Creating-then-starting-a-JMS-consumer-around-another-component-tp5736955p5737347.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Reply via email to