Hi,

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.

<destinationPolicy>
      <policyMap>
        <policyEntries>
          <policyEntry topic="ydisc.demo.t1.>">
            <subscriptionRecoveryPolicy>
              <timedSubscriptionRecoveryPolicy recoverDuration="10800000" />
            </subscriptionRecoveryPolicy>
          </policyEntry>
        </policyEntries>
      </policyMap>
    </destinationPolicy>

Using activemq 5.3.2, jdk1.6 on Linux.

Am I doing anything wrong or is this a bug?

Thanks,
Tejal
-- 
View this message in context: 
http://activemq.2283324.n4.nabble.com/Getting-duplicate-messages-with-retroactive-consumer-tp3321887p3321887.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to