activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Iblis <>
Subject Manually triggering message recovery / process messages only if the producer is online
Date Thu, 05 Aug 2010 07:52:57 GMT


I'm using ActiveMQ 5.3.2 together with Camel 2.1.0 and have a producer and a
consumer communicating trough a queue, using an embedded broker.
I have activated persistence, so that messages don't get lost if producer or
consumer are in an error state.

My application layer on the consumer-side can only process the consumed
messages if the producer of said messages is online / connected to the
broker. Therefore, I use INDIVIDUAL ACKNOWLEDGE, so that the message only
gets acknowledged if the application layer was able to process it.

If the application layer was not able to process it, the message stays in
the persitence store and does only get redelivered after a restart of the
consumer application. The problem: During the recovery-phase, the producer
ist not yet connected, so the messages won't get processed again, and stay
in the persitence store forever.

>From my current point of view, I only see two options:
- Trigger the recovery again if the producer got connected (e.g. through
listening to the advisory channel)
- check if the dispatched message came from the persitence store, and cache
it in a map until a producer is available

Having a look at the ActiveMQ-API, I found no way of doing any of those
options. I know that I am able to call recover on an ActiveMQSession, but I
have no access to the session when I use camel.

Is there any way to call the recovery manually, or, find out if a message
came from the persitence store?

Thanks and regards,
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message