<p>I have two pods one is my ArtemisMQ pod and another is a consumer service.
I have ingress set up so that I can access the console which works, but the issue comes down to when my consumer pod is trying to access port 61616 for connections.</p>
<p>The error I get from my consumer pod</p>
<pre><code>Could not refresh JMS Connection for destination 'PricingSave' - retrying using FixedBackOff{interval=5000, currentAttempts=0, maxAttempts=unlimited}. Cause: Failed to create session factory; nested exception is ActiveMQConnectionTimedOutException[errorType=CONNECTION_TIMEDOUT message=AMQ219013: Timed out waiting to receive cluster topology. Group:null]
</code></pre>
<p>My broker config:</p>
<pre><code>&lt;?xml version='1.0'?&gt;

&lt;configuration xmlns=&quot;urn:activemq&quot;
               xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
               xmlns:xi=&quot;http://www.w3.org/2001/XInclude&quot;
               xsi:schemaLocation=&quot;urn:activemq /schema/artemis-configuration.xsd&quot;&gt;

   &lt;core xmlns=&quot;urn:activemq:core&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
         xsi:schemaLocation=&quot;urn:activemq:core &quot;&gt;

      &lt;name&gt;Artemis&lt;/name&gt;
      
      &lt;broadcast-groups&gt;
        &lt;broadcast-group name=&quot;brokerCluster-broadcast&quot;&gt;
                &lt;local-bind-address&gt;0.0.0.0&lt;/local-bind-address&gt;
                &lt;local-bind-port&gt;10000&lt;/local-bind-port&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;20&lt;/broadcast-period&gt;
                &lt;connector-ref&gt;netty-connector&lt;/connector-ref&gt;
            &lt;/broadcast-group&gt;
        &lt;/broadcast-groups&gt;

        &lt;discovery-groups&gt;
            &lt;discovery-group name=&quot;brokerCluster-discovery&quot;&gt;
                &lt;local-bind-port&gt;10000&lt;/local-bind-port&gt;
                &lt;local-bind-address&gt;0.0.0.0&lt;/local-bind-address&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;10&lt;/refresh-timeout&gt;
            &lt;/discovery-group&gt;
        &lt;/discovery-groups&gt;

      &lt;cluster-connections&gt;
            &lt;cluster-connection name=&quot;brokerCluster&quot;&gt;
                &lt;connector-ref&gt;netty-connector&lt;/connector-ref&gt;
                &lt;retry-interval&gt;500&lt;/retry-interval&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;discovery-group-ref discovery-group-name=&quot;brokerCluster-discovery&quot;/&gt;
        &lt;/cluster-connection&gt;
      &lt;/cluster-connections&gt;

      &lt;connectors&gt;
        &lt;connector name=&quot;netty-connector&quot;&gt;tcp://PODS_IP:61616&lt;/connector&gt;
      &lt;/connectors&gt;

      &lt;persistence-enabled&gt;true&lt;/persistence-enabled&gt;

      &lt;!-- this could be ASYNCIO, MAPPED, NIO
           ASYNCIO: Linux Libaio
           MAPPED: mmap files
           NIO: Plain Java Files
       --&gt;
      &lt;journal-type&gt;ASYNCIO&lt;/journal-type&gt;

      &lt;paging-directory&gt;data/paging&lt;/paging-directory&gt;

      &lt;bindings-directory&gt;data/bindings&lt;/bindings-directory&gt;

      &lt;journal-directory&gt;data/journal&lt;/journal-directory&gt;

      &lt;large-messages-directory&gt;data/large-messages&lt;/large-messages-directory&gt;

      &lt;journal-datasync&gt;true&lt;/journal-datasync&gt;

      &lt;journal-min-files&gt;2&lt;/journal-min-files&gt;

      &lt;journal-pool-files&gt;10&lt;/journal-pool-files&gt;

      &lt;journal-device-block-size&gt;4096&lt;/journal-device-block-size&gt;

      &lt;journal-file-size&gt;10M&lt;/journal-file-size&gt;

      &lt;!--
       This value was determined through a calculation.
       Your system could perform 2.84 writes per millisecond
       on the current journal configuration.
       That translates as a sync write every 352000 nanoseconds.

       Note: If you specify 0 the system will perform writes directly to the disk.
             We recommend this to be 0 if you are using journalType=MAPPED and journal-datasync=false.
      --&gt;
      &lt;journal-buffer-timeout&gt;352000&lt;/journal-buffer-timeout&gt;


      &lt;!--
        When using ASYNCIO, this will determine the writing queue depth for libaio.
       --&gt;
      &lt;journal-max-io&gt;4096&lt;/journal-max-io&gt;
      &lt;!--
        You can verify the network health of a particular NIC by specifying the &lt;network-check-NIC&gt; element.
         &lt;network-check-NIC&gt;theNicName&lt;/network-check-NIC&gt;
        --&gt;

      &lt;!--
        Use this to use an HTTP server to validate the network
         &lt;network-check-URL-list&gt;http://www.apache.org&lt;/network-check-URL-list&gt; --&gt;

      &lt;!-- &lt;network-check-period&gt;10000&lt;/network-check-period&gt; --&gt;
      &lt;!-- &lt;network-check-timeout&gt;1000&lt;/network-check-timeout&gt; --&gt;

      &lt;!-- this is a comma separated list, no spaces, just DNS or IPs
           it should accept IPV6

           Warning: Make sure you understand your network topology as this is meant to validate if your network is valid.
                    Using IPs that could eventually disappear or be partially visible may defeat the purpose.
                    You can use a list of multiple IPs, and if any successful ping will make the server OK to continue running --&gt;
      &lt;!-- &lt;network-check-list&gt;10.0.0.1&lt;/network-check-list&gt; --&gt;

      &lt;!-- use this to customize the ping used for ipv4 addresses --&gt;
      &lt;!-- &lt;network-check-ping-command&gt;ping -c 1 -t %d %s&lt;/network-check-ping-command&gt; --&gt;

      &lt;!-- use this to customize the ping used for ipv6 addresses --&gt;
      &lt;!-- &lt;network-check-ping6-command&gt;ping6 -c 1 %2$s&lt;/network-check-ping6-command&gt; --&gt;




      &lt;!-- how often we are looking for how many bytes are being used on the disk in ms --&gt;
      &lt;disk-scan-period&gt;5000&lt;/disk-scan-period&gt;

      &lt;!-- once the disk hits this limit the system will block, or close the connection in certain protocols
           that won't support flow control. --&gt;
      &lt;max-disk-usage&gt;90&lt;/max-disk-usage&gt;

      &lt;!-- should the broker detect dead locks and other issues --&gt;
      &lt;critical-analyzer&gt;true&lt;/critical-analyzer&gt;

      &lt;critical-analyzer-timeout&gt;120000&lt;/critical-analyzer-timeout&gt;

      &lt;critical-analyzer-check-period&gt;60000&lt;/critical-analyzer-check-period&gt;

      &lt;critical-analyzer-policy&gt;HALT&lt;/critical-analyzer-policy&gt;


      &lt;page-sync-timeout&gt;484000&lt;/page-sync-timeout&gt;


            &lt;!-- the system will enter into page mode once you hit this limit.
           This is an estimate in bytes of how much the messages are using in memory

            The system will use half of the available memory (-Xmx) by default for the global-max-size.
            You may specify a different value here if you need to customize it to your needs.

            &lt;global-max-size&gt;100Mb&lt;/global-max-size&gt;

      --&gt;

      &lt;acceptors&gt;

         &lt;!-- Acceptor for every supported protocol --&gt;
         &lt;acceptor name=&quot;artemis&quot;&gt;tcp://PODS_IP:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;amqpMinLargeMessageSize=102400;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true&lt;/acceptor&gt;

         &lt;!-- AMQP Acceptor.  Listens on default AMQP port for AMQP traffic.--&gt;
         &lt;acceptor name=&quot;amqp&quot;&gt;tcp://PODS_IP:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpMinLargeMessageSize=102400;amqpDuplicateDetection=true&lt;/acceptor&gt;

         &lt;!-- STOMP Acceptor. --&gt;
         &lt;acceptor name=&quot;stomp&quot;&gt;tcp://PODS_IP:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true&lt;/acceptor&gt;

         &lt;!-- HornetQ Compatibility Acceptor.  Enables HornetQ Core and STOMP for legacy HornetQ clients. --&gt;
         &lt;acceptor name=&quot;hornetq&quot;&gt;tcp://PODS_IP:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true&lt;/acceptor&gt;

         &lt;!-- MQTT Acceptor --&gt;
         &lt;acceptor name=&quot;mqtt&quot;&gt;tcp://PODS_IP:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true&lt;/acceptor&gt;

      &lt;/acceptors&gt;


      &lt;security-settings&gt;
         &lt;security-setting match=&quot;#&quot;&gt;
            &lt;permission type=&quot;createNonDurableQueue&quot; roles=&quot;amq&quot;/&gt;
            &lt;permission type=&quot;deleteNonDurableQueue&quot; roles=&quot;amq&quot;/&gt;
            &lt;permission type=&quot;createDurableQueue&quot; roles=&quot;amq&quot;/&gt;
            &lt;permission type=&quot;deleteDurableQueue&quot; roles=&quot;amq&quot;/&gt;
            &lt;permission type=&quot;createAddress&quot; roles=&quot;amq&quot;/&gt;
            &lt;permission type=&quot;deleteAddress&quot; roles=&quot;amq&quot;/&gt;
            &lt;permission type=&quot;consume&quot; roles=&quot;amq&quot;/&gt;
            &lt;permission type=&quot;browse&quot; roles=&quot;amq&quot;/&gt;
            &lt;permission type=&quot;send&quot; roles=&quot;amq&quot;/&gt;
            &lt;!-- we need this otherwise ./artemis data imp wouldn't work --&gt;
            &lt;permission type=&quot;manage&quot; roles=&quot;amq&quot;/&gt;
         &lt;/security-setting&gt;
      &lt;/security-settings&gt;

      &lt;address-settings&gt;
         &lt;!-- if you define auto-create on certain queues, management has to be auto-create --&gt;
         &lt;address-setting match=&quot;activemq.management#&quot;&gt;
            &lt;dead-letter-address&gt;DLQ&lt;/dead-letter-address&gt;
            &lt;expiry-address&gt;ExpiryQueue&lt;/expiry-address&gt;
            &lt;redelivery-delay&gt;0&lt;/redelivery-delay&gt;
            &lt;!-- with -1 only the global-max-size is in use for limiting --&gt;
            &lt;max-size-bytes&gt;-1&lt;/max-size-bytes&gt;
            &lt;message-counter-history-day-limit&gt;10&lt;/message-counter-history-day-limit&gt;
            &lt;address-full-policy&gt;PAGE&lt;/address-full-policy&gt;
            &lt;auto-create-queues&gt;true&lt;/auto-create-queues&gt;
            &lt;auto-create-addresses&gt;true&lt;/auto-create-addresses&gt;
            &lt;auto-create-jms-queues&gt;true&lt;/auto-create-jms-queues&gt;
            &lt;auto-create-jms-topics&gt;true&lt;/auto-create-jms-topics&gt;
         &lt;/address-setting&gt;
         &lt;!--default for catch all--&gt;
         &lt;address-setting match=&quot;#&quot;&gt;
            &lt;dead-letter-address&gt;dlq&lt;/dead-letter-address&gt;
            &lt;expiry-address&gt;ExpiryQueue&lt;/expiry-address&gt;
            &lt;redelivery-delay&gt;0&lt;/redelivery-delay&gt;
            &lt;!-- with -1 only the global-max-size is in use for limiting --&gt;
            &lt;max-size-bytes&gt;-1&lt;/max-size-bytes&gt;
            &lt;message-counter-history-day-limit&gt;10&lt;/message-counter-history-day-limit&gt;
            &lt;address-full-policy&gt;PAGE&lt;/address-full-policy&gt;
            &lt;auto-create-queues&gt;true&lt;/auto-create-queues&gt;
            &lt;auto-create-addresses&gt;true&lt;/auto-create-addresses&gt;
            &lt;auto-create-jms-queues&gt;true&lt;/auto-create-jms-queues&gt;
            &lt;auto-create-jms-topics&gt;true&lt;/auto-create-jms-topics&gt;
         &lt;/address-setting&gt;
      &lt;/address-settings&gt;

      &lt;addresses&gt;
         &lt;address name=&quot;PricingSave.dlq&quot;&gt;
            &lt;anycast&gt;
               &lt;queue name=&quot;PricingSave.dlq&quot;/&gt;
            &lt;/anycast&gt;
         &lt;/address&gt;
         &lt;address name=&quot;PricingSave&quot;&gt;
            &lt;anycast&gt;
               &lt;queue name=&quot;PricingSave&quot;/&gt;
            &lt;/anycast&gt;
         &lt;/address&gt;

         &lt;address name=&quot;ExpiryQueue&quot;&gt;
            &lt;anycast&gt;
               &lt;queue name=&quot;ExpiryQueue&quot; /&gt;
            &lt;/anycast&gt;
         &lt;/address&gt;

      &lt;/addresses&gt;

      &lt;!-- Uncomment the following if you want to use the Standard LoggingActiveMQServerPlugin pluging to log in events
      &lt;broker-plugins&gt;
         &lt;broker-plugin class-name=&quot;org.apache.activemq.artemis.core.server.plugin.impl.LoggingActiveMQServerPlugin&quot;&gt;
            &lt;property key=&quot;LOG_ALL_EVENTS&quot; value=&quot;true&quot;/&gt;
            &lt;property key=&quot;LOG_CONNECTION_EVENTS&quot; value=&quot;true&quot;/&gt;
            &lt;property key=&quot;LOG_SESSION_EVENTS&quot; value=&quot;true&quot;/&gt;
            &lt;property key=&quot;LOG_CONSUMER_EVENTS&quot; value=&quot;true&quot;/&gt;
            &lt;property key=&quot;LOG_DELIVERING_EVENTS&quot; value=&quot;true&quot;/&gt;
            &lt;property key=&quot;LOG_SENDING_EVENTS&quot; value=&quot;true&quot;/&gt;
            &lt;property key=&quot;LOG_INTERNAL_EVENTS&quot; value=&quot;true&quot;/&gt;
         &lt;/broker-plugin&gt;
      &lt;/broker-plugins&gt;
      --&gt;

   &lt;/core&gt;
&lt;/configuration&gt;
</code></pre>
<p>My Artemis Service config:</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
  labels:
    name: amq
  name: amq
  namespace: default
spec:
  selector:
    app: amq
  ports:
    - name: web
      port: 8161
      protocol: TCP
      targetPort: 8161
    - name: stomp
      port: 61613
      protocol: TCP
      targetPort: 61613
    - name: mqtt
      port: 1883
      protocol: TCP
      targetPort: 1883
    - name: openwire
      port: 61616
      protocol: TCP
      targetPort: 61616
    - name: jmx
      port: 9404
      protocol: TCP
      targetPort: 9404
    - name: hornetq
      port: 5445
      protocol: TCP
      targetPort: 5445
    - name: amqp
      port: 5672
      protocol: TCP
      targetPort: 5672
  sessionAffinity: None
  type: ClusterIP
</code></pre>
<p>My Artemis deployment Config:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: amq
  name: amq
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: amq
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        linkerd.io/inject: enabled
      labels:
        app: amq
    spec:
      containers:
      - image: REPOSITORY/IMAGE
        name: amq
        env:
          - name: KUBERNETES_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: CONTAINER_CORE_LIMIT
            valueFrom:
              resourceFieldRef:
                resource: limits.cpu
          - name: CONTAINER_MAX_MEMORY
            valueFrom:
              resourceFieldRef:
                resource: limits.memory
        ports:
        - containerPort: 8161
          name: web
          protocol: TCP
        - containerPort: 61613
          name: stomp
          protocol: TCP
        - containerPort: 1883
          name: mqtt
          protocol: TCP
        - containerPort: 61616
          name: openwire
          protocol: TCP
        - containerPort: 9404
          name: jmx
          protocol: TCP
        - containerPort: 5445
          name: hornetq
          protocol: TCP
        - containerPort: 5672
          name: amqp
          protocol: TCP
        imagePullPolicy: Always
        resources:
          requests:
            cpu: 200m
            memory: 512Mi
          limits:
            cpu: 400m
            memory: 1012Mi
        securityContext:
          capabilities:
            add:
              - NET_ADMIN
              - NET_RAW
      restartPolicy: Always
      imagePullSecrets:
        - name: my-registry...
</code></pre>

<p>Using <code>0.0.0.0</code> for a connector is not valid. In fact, there should be a <code>WARN</code> level message in the log about it. Your cluster will not form properly with such a configuration. You need to use a hostname or IP address that other hosts can use to reach the broker that broadcasts it. That's the whole point of the <code>broadcast-group</code> - to tell other brokers who may be listening how they can connect to it.</p>
