I can't answer question #2, so I asked the dev list if someone could answer
it.

For #1, what you're seeing is not expected when conduitSubscriptions is in
use. In fact, this behavior is expected when someone fails to use
conduitSubscriptions, so it's odd that you're seeing it with
conduitSubscriptions enabled. Your earlier messages sounded like you
debugged the C-B and D-B links to confirm that conduitSubscriptions was in
used there, but have you confirmed that conduitSubscriptions is also being
applied on the A-B link? That's the only one where it matters.

Tim

Did you confirm which broker is the one where the duplication occurs? Also,
does broker D also get two copies of the message, or does it get one or
zero?

On Jul 25, 2017 6:40 AM, "tpavelka" <tomas.pave...@ca.com> wrote:

> 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