Could a better solution be to use durable subscriptions or ActiveMQ virtual topics so you're not depending on the timing of your consumer starting up as the basis for not missing messages?
On Wed, Aug 7, 2013 at 6:43 PM, John D. Ament <john.d.am...@gmail.com>wrote: > Hi, > > Why isn't 2,1,3 possible? > Why not setup your consumer before you start up your camel context? > > On Wed, Aug 7, 2013 at 7:22 PM, markgize <mark.gizejew...@pimco.com> > wrote: > > We are interested in Camel but have a specific startup sequence that we > need > > to follow: > > > > 1) Open a JMS topic consumer for our updates, but, do not get any of the > > messages. > > 2) Query our database and build a state of the world > > 3) Start to get the update messages from the consumer we opened > > > > We cannot adopt 2, 1, 3, as during the time we are done with our query > but > > are still constructing the state of the world, we might miss an update. > 1, > > 3, 2, is also a problem as an update could present an object which our > state > > of the world subsequently tries to build, resulting in a duplicate. We > > could endeavor to handle this duplicate, but it is powerful to load the > bulk > > of our data in the state of the world phase and demand absolutely no > > exceptions. > > > > What we have currently implemented can also result in duplicates. The > state > > of the world might contain an object which an update then subsequently > > provides, but in this case we merely reject just one update, as opposed > to > > having an issue with the much more significant state of the world > operation. > > > > How can we achieve 1, 2, 3 using Camel? The difficulty that I see is > that > > our consumer must be receiving messages, however, it must not consume > them > > until the state of the world completes. > > > > Thanks for your time. > > > > > > > > -- > > View this message in context: > http://camel.465427.n5.nabble.com/Creating-then-starting-a-JMS-consumer-around-another-component-tp5736955.html > > Sent from the Camel - Users mailing list archive at Nabble.com. > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta