Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Information Provided
-
2.17.0, 2.20.0
-
None
-
Artemis 2.17.0 on 3 Linux machines
Dragonwell OpenJDK 11.0.10
Description
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:
<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>
And here is the config of C:
<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>
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.