I can now reliably reproduce the duplication and I can prevent it. However,
the behavior leaves me a bit puzzled:

The issue is that the broker adds the message twice to the subscription, via
org.apache.activemq.broker.region.TopicSubscription#add

There is a check for duplicate messages,
org.apache.activemq.broker.region.TopicSubscription#isDuplicate which only
works if org.apache.activemq.broker.region.TopicSubscription#enableAudit is
enabled (set to true).

enableAutdit is false by default and thus I am getting duplicate messages.
However, if I add a policy that applies to the topic, then policies have
org.apache.activemq.broker.region.policy.PolicyEntry#enableAudit which is
true by default, so any policy applied to the destination will turn audit on
and prevent duplicated messages.

I have a couple of questions:

1) Is getting duplicate messages expected behavior, if conduitSubscribers is
set to true? (i.e. when I am using
org.apache.activemq.network.DurableConduitBridge)?

2) Why does the auditing default change when policies are applied? Or, what
is the reason that TopicSubscription has audit off by default?

Thanks,
Tomas



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Duplicate-messages-received-with-ActiveMQ-5-13-2-tp4728627p4728871.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to