Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-3262

Cannot get max-hops >= 2 federation to work

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.17.0
    • None
    • Federation
    • 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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            zxfksie Zhang Xiang

            Dates

              Created:
              Updated:

              Issue deployment