activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Getting duplicate messages with retroactive consumer
Date Wed, 23 Feb 2011 23:28:23 GMT


We are evaluating ActiveMQ as a solution for our messaging broker. One of
the requirements is to be able to replay messages received on a destination.
When using retroactive consumer, I observed that the same set of messages
get sent twice.

Following is the scenario and steps followed:

1. Start a consumer C1 with a durable subscription sub1 on topic
T1.(?consumer.retroactive=true when creating topic T1)
2. Bring the consumer C1 down
3. Send 5 messages between time t1-t2.
4. Again, send 10 messages between time t2-t3.
5. Now start another consumer C2 with durable subscription sub2 on topic T1
specifying the selector as "JMSTimestamp > t2 AND JMSTimestamp < t3"

Consumer C2 gets the messages between t2-t3 twice. ie it gets 20 messages
when it expects 10.
This happens only for the "first" time when the consumer C2 is started. If
the consumer C2 is brought down and started again, then it receives the
expected 10 messages.

We are using the following subscriptionRecoveryPolicy.

          <policyEntry topic="ydisc.demo.t1.>">
              <timedSubscriptionRecoveryPolicy recoverDuration="10800000" />

Using activemq 5.3.2, jdk1.6 on Linux.

Am I doing anything wrong or is this a bug?

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

View raw message