title: How to form a symmetric cluster of 3 nodes with discovery-groups in ActiveMQ Artemis?
body: <p>I have created a StatefulSet in Kubernetes with three replicas. The override-broker XML file is as follows -</p>
  <pre><code>&lt;configuration xmlns=&quot;urn:activemq&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
                 xsi:schemaLocation=&quot;urn:activemq /schema/artemis-configuration.xsd&quot;&gt;
      &lt;core xmlns=&quot;urn:activemq:core&quot; xsi:schemaLocation=&quot;urn:activemq:core &quot;&gt;
  
          &lt;cluster-user&gt;admin&lt;/cluster-user&gt;
  
          &lt;cluster-password&gt;admin&lt;/cluster-password&gt;
  
          &lt;acceptors&gt;
              &lt;acceptor name=&quot;stomp&quot;&gt;tcp://0.0.0.0:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true;stompConsumerCredits=1;stompEnableMessageId=true&lt;/acceptor&gt;
          &lt;/acceptors&gt;
  
          &lt;connectors&gt;
              &lt;connector name=&quot;$HOSTNAME&quot;&gt;tcp://$HOSTNAME.&lt;service&gt;.&lt;namespace&gt;.&lt;domain&gt;:61616&lt;/connector&gt;
          &lt;/connectors&gt;
  
  
          &lt;broadcast-groups&gt;
              &lt;broadcast-group name=&quot;my-broadcast-group&quot;&gt;
                  &lt;group-address&gt;231.7.7.7&lt;/group-address&gt;
                  &lt;group-port&gt;9876&lt;/group-port&gt;
                  &lt;broadcast-period&gt;100&lt;/broadcast-period&gt;
                  &lt;connector-ref&gt;$HOSTNAME&lt;/connector-ref&gt;
              &lt;/broadcast-group&gt;
          &lt;/broadcast-groups&gt;
  
          &lt;discovery-groups&gt;
              &lt;discovery-group name=&quot;my-discovery-group&quot;&gt;
                  &lt;group-address&gt;231.7.7.7&lt;/group-address&gt;
                  &lt;group-port&gt;9876&lt;/group-port&gt;
                  &lt;refresh-timeout&gt;10000&lt;/refresh-timeout&gt;
              &lt;/discovery-group&gt;
          &lt;/discovery-groups&gt;
  
          &lt;cluster-connections&gt;
              &lt;cluster-connection name=&quot;my-artemis-cluster&quot;&gt;
                  &lt;address&gt;&lt;/address&gt;
                  &lt;connector-ref&gt;$HOSTNAME&lt;/connector-ref&gt;
                  &lt;check-period&gt;1000&lt;/check-period&gt;
                  &lt;connection-ttl&gt;5000&lt;/connection-ttl&gt;
                  &lt;min-large-message-size&gt;50000&lt;/min-large-message-size&gt;
                  &lt;call-timeout&gt;5000&lt;/call-timeout&gt;
                  &lt;retry-interval&gt;500&lt;/retry-interval&gt;
                  &lt;retry-interval-multiplier&gt;1.0&lt;/retry-interval-multiplier&gt;
                  &lt;max-retry-interval&gt;5000&lt;/max-retry-interval&gt;
                  &lt;initial-connect-attempts&gt;-1&lt;/initial-connect-attempts&gt;
                  &lt;reconnect-attempts&gt;-1&lt;/reconnect-attempts&gt;
                  &lt;use-duplicate-detection&gt;true&lt;/use-duplicate-detection&gt;
                  &lt;message-load-balancing&gt;ON_DEMAND&lt;/message-load-balancing&gt;
                  &lt;max-hops&gt;1&lt;/max-hops&gt;
                  &lt;confirmation-window-size&gt;32000&lt;/confirmation-window-size&gt;
                  &lt;call-failover-timeout&gt;30000&lt;/call-failover-timeout&gt;
                  &lt;notification-interval&gt;1000&lt;/notification-interval&gt;
                  &lt;notification-attempts&gt;10&lt;/notification-attempts&gt;
                  &lt;discovery-group-ref discovery-group-name=&quot;my-discovery-group&quot;/&gt;
              &lt;/cluster-connection&gt;
          &lt;/cluster-connections&gt;
  
          &lt;address-settings&gt;
              &lt;address-setting match=&quot;/queue/#&quot;&gt;
                  &lt;default-address-routing-type&gt;ANYCAST&lt;/default-address-routing-type&gt;
                  &lt;default-queue-routing-type&gt;ANYCAST&lt;/default-queue-routing-type&gt;
              &lt;/address-setting&gt;
              &lt;address-setting match=&quot;/topic/#&quot;&gt;
                  &lt;default-address-routing-type&gt;MULTICAST&lt;/default-address-routing-type&gt;
                  &lt;default-queue-routing-type&gt;MULTICAST&lt;/default-queue-routing-type&gt;
              &lt;/address-setting&gt;
              &lt;address-setting match=&quot;#&quot;&gt;
                  &lt;auto-delete-queues&gt;false&lt;/auto-delete-queues&gt;
                  &lt;auto-delete-jms-queues&gt;false&lt;/auto-delete-jms-queues&gt;
                  &lt;auto-delete-jms-topics&gt;false&lt;/auto-delete-jms-topics&gt;
                  &lt;auto-delete-addresses&gt;false&lt;/auto-delete-addresses&gt;
                  &lt;max-delivery-attempts&gt;100&lt;/max-delivery-attempts&gt;
                  &lt;expiry-delay&gt;86400000&lt;/expiry-delay&gt;
                  &lt;redelivery-delay&gt;3000&lt;/redelivery-delay&gt;
                  &lt;redelivery-delay-multiplier&gt;1&lt;/redelivery-delay-multiplier&gt;
                  &lt;redelivery-collision-avoidance-factor&gt;0.15&lt;/redelivery-collision-avoidance-factor&gt;
                  &lt;max-redelivery-delay&gt;50000&lt;/max-redelivery-delay&gt;
                  &lt;default-consumer-window-size&gt;0&lt;/default-consumer-window-size&gt;
                  &lt;redistribution-delay&gt;3000&lt;/redistribution-delay&gt;
              &lt;/address-setting&gt;
          &lt;/address-settings&gt;
          &lt;wildcard-addresses&gt;
              &lt;routing-enabled&gt;true&lt;/routing-enabled&gt;
              &lt;delimiter&gt;/&lt;/delimiter&gt;
              &lt;any-words&gt;#&lt;/any-words&gt;
              &lt;single-word&gt;*&lt;/single-word&gt;
          &lt;/wildcard-addresses&gt;
      &lt;/core&gt;
  &lt;/configuration&gt;
  </code></pre>
  <p>The problem that I observed is that in spite of setting <code>max-hops=1</code>, the <em>Diagram</em> tab shows only two nodes connected with each other. The diagram in each node is something like -</p>
  <ul>
  <li><strong>node-0</strong>: node-0 connected-with node-1</li>
  <li><strong>node-1</strong>: node-1 connected with node-0</li>
  <li><strong>node-2</strong>: node-2 connected with node-0</li>
  </ul>
  <p>Although, the expectation is that in all nodes the diagram should be as follows -</p>
  <ul>
  <li><strong>node-&lt;i&gt;</strong>: node-0 connected-with node-1; node-1 connected-with node-2; node-0 connected-with node-2</li>
  </ul>