[
https://issues.apache.org/jira/browse/ARTEMIS-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy A. Bish resolved ARTEMIS-3262.
--------------------------------------
Resolution: Information Provided
> Cannot get max-hops >= 2 federation to work
> -------------------------------------------
>
> Key: ARTEMIS-3262
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3262
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Federation
> Affects Versions: 2.17.0, 2.20.0
> Environment: Artemis 2.17.0 on 3 Linux machines
> Dragonwell OpenJDK 11.0.10
> Reporter: Zhang Xiang
> Priority: Major
> Labels: ActiveMQ, federation
>
> I want to construct a 3-level MQTT message forwarding system:
> A → B → C
> Once a message publish under the topic "from-A" to A, all clients subscribing
> "from-A" on B and C should receive that message.
> Here is the config of B:
>
> {code:xml}
> <connectors>
> <connector name="connector-A">tcp://192.168.1.200:61616</connector>
> </connectors>
> <federations>
> <federation name="federation-B">
> <upstream name="upstream-from-A">
> <share-connection>true</share-connection>
> <static-connectors>
> <connector-ref>connector-A</connector-ref>
> </static-connectors>
> <policy ref="policy-from-A"/>
> </upstream>
> <address-policy name="policy-from-A" max-hops="2">
> <include address-match="from-A" />
> </address-policy>
>
> </federation>
> </federations>
> <addresses>
> <address name="from-A">
> <multicast>
> <queue name="from-A-subscription"/>
> </multicast>
> </address>
> {code}
> And here is the config of C:
>
>
> {code:xml}
> <connectors>
> <connector name="connector-B">tcp://192.168.1.100:61616</connector>
> </connectors>
> <federations>
> <federation name="federation-C">
> <upstream name="upstream-from-C">
> <static-connectors>
> <connector-ref>connector-C</connector-ref>
> </static-connectors>
> <policy ref="policy-from-A"/>
> </upstream>
> <address-policy name="policy-from-A" max-hops="1">
> <include address-match="from-A" />
> </address-policy>
> </federation>
> </federations>
> <addresses>
> <address name="from-A">
> <multicast>
> <queue name="from-A-subscription"/>
> </multicast>
> </address>
> </addresses>
> {code}
> The problem is that even I've set max-hops to 2, the message cannot be
> forwarded for more than 1 time.
>
> * If I published a "from-A" message to B, all clients subscribing "from-A"
> on C could receive the message.
> * If I published a "from-A" message to A, all clients subscribing "from-A"
> on B could receive the message, but clients on C wouldn't!
> The example config files provided by the software packages do not cover this
> kind of situations, nor do the documentation.
> Please tell me if it is a bug and if not, what should I do.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)