Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Creating then starting a JMS consumer around another component

$
0
0
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.

Viewing all articles
Browse latest Browse all 5648

Trending Articles