You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Tomas Pavelka (JIRA)" <ji...@apache.org> on 2017/08/03 11:56:00 UTC

[jira] [Commented] (AMQ-6784) Duplicate messages received in hub and spoke topology

    [ https://issues.apache.org/jira/browse/AMQ-6784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16112621#comment-16112621 ] 

Tomas Pavelka commented on AMQ-6784:
------------------------------------

Additional discussion of the problem is in the user forum:
http://activemq.2283324.n4.nabble.com/Duplicate-messages-received-with-ActiveMQ-5-13-2-td4728627.html


> Duplicate messages received in hub and spoke topology
> -----------------------------------------------------
>
>                 Key: AMQ-6784
>                 URL: https://issues.apache.org/jira/browse/AMQ-6784
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.13.2
>            Reporter: Tomas Pavelka
>            Priority: Minor
>         Attachments: HubAndSpokeDuplicateMessages.java
>
>
> If there are multiple consumers of a single topic in a hub and spoke topology where each of the spokes has an embedded broker, then each of the consumers receives one message sent to the topic multiple times.
> The topology looks like this:
> Spoke (broker) -> Hub (broker) <- Spoke (broker)
>                                     ^
>                             Spoke (broker)         
> If one spoke sends a message to a topic and at least two other spokes have consumers then they will receive the message multiple times.
> The likely cause is that org.apache.activemq.network.ConduitBridge#addToAlreadyInterestedConsumers
> checks if the incoming ConsumerInfo represents a network subscription
> in the topology used it does because the subscription info is passed through two brokers
> There exists a workaround: if any policy is applied to the destination then duplication does not happen. This is because PolicyEntry#enableAudit is true by default and is applied to  org.apache.activemq.broker.region.BaseDestination#enableAudit which is false by default.
> See the attached unit test which reproduces the issue in ActiveMQ 5.13.2 and also demonstrates the workaround. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)