title: how to split queued messages accross several artemis broker
body: <p>I browsed the <a href="https://activemq.apache.org/artemis/docs/latest/examples.html" rel="nofollow noreferrer">examples</a>, the doc and googled with no luck on this so I ask here.</p>
  
  <p>Scenario: "rebalancing" <strong>queued</strong> messages</p>
  
  <p>Given a cluster (masterA and masterB, udp, roundrobin) with a durable queue (testQueue) on each node. Each node is a different server.</p>
  
  <p>And incoming messages</p>
  
  <p>When masterA is down (for whatever reason), messages are only consumed by consumers registered on masterB. Messages keep arriving so messageCount is increasing on masterB.</p>
  
  <p>When masterA is restarted, it will only consume new messages (or old messages were in queue before stop/crash + the new ones) while masterB still has a lot of old messages in the queue.</p>
  
  <p>Is it possible to redistribute messages from masterB to masterA so the consumers attached to masterA can consume "old" messages (initialy stored in masterB)? I have messages containing data with a short time to live (one time payment validation code for example). I'm aware of HA but I need this in case both master and slaves are down (masterA pairs with slaveA and masterB pairs with slaveB using ha-policy/replcation/master/group-name conf in broker.xml).</p>
  
  <p><a href="https://activemq.apache.org/artemis/docs/latest/diverts.html" rel="nofollow noreferrer">Diverts</a> cannot be used to achieve this because I need messages to be rerouted to another server (one that has "free" matching consumers). </p>
  
  <blockquote>
    <p>A divert will only divert a message to an address on the same server, however, if you want to divert to an address on a different server, a common pattern would be to divert to a local store-and-forward queue, then set up a bridge which consumes from that queue and forwards to an address on a different server.</p>
  </blockquote>
  
  <p>and I don't want a permanent bridge that would require manual action to deactivate.</p>
  
  <p><a href="https://activemq.apache.org/artemis/docs/latest/undelivered-messages.html" rel="nofollow noreferrer">Message redelivery</a> is used when there is no consumer. My usecase is "consumer starvation" (consumers on a node doing nothing while consumers on another node are busy at 100%). This is different from <a href="https://activemq.apache.org/artemis/docs/latest/clusters.html#message-redistribution" rel="nofollow noreferrer">what is described in the clustering doc</a>.</p>
  
  <p>Is there a way to share messages between the old and newly added nodes without using a shared store? I don't want to use a shared store because I want to avoid things like network sharing.
  The app is hosted in a virtual environment and sometimes VM are moved from one ESX to another (vmotion) and freeze can happen. When freezing a shared store, no consumer can consume messages which is bad because of short TTL data.</p>
  
  <p>If that matters, the virtual environment is not opened for discussion.</p>
  
  <p>I use artemis 2.6.0 with JMS api</p>
  
  <p>Consumers are MDBs hosted on wildfly 12 which seems to work good (connection rebalancing is great).</p>
  
  <p>Any help is appreciated</p>
  
  <p>Edit:
  as much as I understand it, it looks like there already is <a href="https://issues.apache.org/jira/projects/ARTEMIS/issues/ARTEMIS-28?filter=allopenissues" rel="nofollow noreferrer">a jira about this</a>:</p>
  
  <blockquote>
    <p>Rebalance load after a node has too much load after certain events.</p>
    
    <p>It could be after failover, or after scaling up (starting new nodes on the cluster)</p>
    
    <p>It's not certain if this is just about connections or also about data (queues and topics). We believe that if we just did this on connection level, ACTIVEMQ6-25 would take care of redistributing the data.</p>
  </blockquote>
  
  <p>Edit:</p>
  
  <h2>broker.xml for masterA</h2>
  
  <pre><code>&lt;?xml version='1.0'?&gt;
  
  &lt;configuration xmlns="urn:activemq"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xmlns:xi="http://www.w3.org/2001/XInclude"
                 xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd"&gt;
  
     &lt;core xmlns="urn:activemq:core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="urn:activemq:core "&gt;
  
        &lt;name&gt;broker-0&lt;/name&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;NIO&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-file-size&gt;10M&lt;/journal-file-size&gt;
  
        &lt;journal-buffer-timeout&gt;1208000&lt;/journal-buffer-timeout&gt;
  
  
        &lt;!--
          When using ASYNCIO, this will determine the writing queue depth for libaio.
         --&gt;
        &lt;journal-max-io&gt;1&lt;/journal-max-io&gt;
  
      &lt;connectors&gt;
          &lt;!-- Connector used to be announced through cluster connections and notifications --&gt;
          &lt;connector name="artemis-master-1"&gt;tcp://localhost:61616&lt;/connector&gt;
          &lt;!--        &lt;connector name="artemis-slave-1"&gt;tcp://localhost:61617&lt;/connector&gt;         --&gt;
      &lt;/connectors&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;acceptors&gt;
  
           &lt;!-- Acceptor for every supported protocol --&gt;
           &lt;acceptor name="artemis"&gt;tcp://localhost:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300&lt;/acceptor&gt;
  
           &lt;!-- AMQP Acceptor.  Listens on default AMQP port for AMQP traffic.--&gt;
           &lt;acceptor name="amqp"&gt;tcp://localhost:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpMinCredits=300&lt;/acceptor&gt;
  
           &lt;!-- STOMP Acceptor. --&gt;
           &lt;acceptor name="stomp"&gt;tcp://localhost: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="hornetq"&gt;tcp://localhost:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true&lt;/acceptor&gt;
  
           &lt;!-- MQTT Acceptor --&gt;
           &lt;acceptor name="mqtt"&gt;tcp://localhost:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true&lt;/acceptor&gt;
  
        &lt;/acceptors&gt;
  
  
        &lt;cluster-user&gt;admin&lt;/cluster-user&gt;
  
        &lt;cluster-password&gt;admin&lt;/cluster-password&gt;
  
        &lt;broadcast-groups&gt;
           &lt;broadcast-group name="bg-group1"&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;1801&lt;/broadcast-period&gt;
              &lt;connector-ref&gt;artemis-master-1&lt;/connector-ref&gt;
           &lt;/broadcast-group&gt;
        &lt;/broadcast-groups&gt;
  
        &lt;discovery-groups&gt;
           &lt;discovery-group name="dg-group1"&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;8001&lt;/refresh-timeout&gt;
           &lt;/discovery-group&gt;
        &lt;/discovery-groups&gt;
  
        &lt;cluster-connections&gt;
           &lt;cluster-connection name="my-cluster"&gt;
              &lt;connector-ref&gt;artemis-master-1&lt;/connector-ref&gt;
              &lt;check-period&gt;800&lt;/check-period&gt;
                &lt;connection-ttl&gt;2001&lt;/connection-ttl&gt;
                &lt;initial-connect-attempts&gt;4&lt;/initial-connect-attempts&gt;
                &lt;reconnect-attempts&gt;1&lt;/reconnect-attempts&gt;
              &lt;message-load-balancing&gt;ON_DEMAND&lt;/message-load-balancing&gt;
              &lt;max-hops&gt;1&lt;/max-hops&gt;
              &lt;notification-interval&gt;500&lt;/notification-interval&gt;
              &lt;notification-attempts&gt;1&lt;/notification-attempts&gt;
              &lt;discovery-group-ref discovery-group-name="dg-group1"/&gt;
           &lt;/cluster-connection&gt;
        &lt;/cluster-connections&gt;
  
  
        &lt;ha-policy&gt;
           &lt;replication&gt;
              &lt;master&gt;
                &lt;group-name&gt;grappe-1&lt;/group-name&gt;
                &lt;check-for-live-server&gt;true&lt;/check-for-live-server&gt;            
              &lt;/master&gt;
           &lt;/replication&gt;
        &lt;/ha-policy&gt;
  
        &lt;security-settings&gt;
           &lt;security-setting match="#"&gt;
              &lt;permission type="createNonDurableQueue" roles="amq"/&gt;
              &lt;permission type="deleteNonDurableQueue" roles="amq"/&gt;
              &lt;permission type="createDurableQueue" roles="amq"/&gt;
              &lt;permission type="deleteDurableQueue" roles="amq"/&gt;
              &lt;permission type="createAddress" roles="amq"/&gt;
              &lt;permission type="deleteAddress" roles="amq"/&gt;
              &lt;permission type="consume" roles="amq"/&gt;
              &lt;permission type="browse" roles="amq"/&gt;
              &lt;permission type="send" roles="amq"/&gt;
              &lt;!-- we need this otherwise ./artemis data imp wouldn't work --&gt;
              &lt;permission type="manage" roles="amq"/&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="activemq.management#"&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="#"&gt;
              &lt;redistribution-delay&gt;5000&lt;/redistribution-delay&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="DLQ"&gt;
              &lt;anycast&gt;
                 &lt;queue name="DLQ" /&gt;
              &lt;/anycast&gt;
           &lt;/address&gt;
           &lt;address name="ExpiryQueue"&gt;
              &lt;anycast&gt;
                 &lt;queue name="ExpiryQueue" /&gt;
              &lt;/anycast&gt;
           &lt;/address&gt;
  
        &lt;/addresses&gt;
  
     &lt;/core&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <h2> broker.xml for masterB </h2>
  
  <pre><code>&lt;?xml version='1.0'?&gt;  &lt;configuration xmlns="urn:activemq"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xmlns:xi="http://www.w3.org/2001/XInclude"
                 xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd"&gt;
  
     &lt;core xmlns="urn:activemq:core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="urn:activemq:core"&gt;
  
        &lt;name&gt;broker-2&lt;/name&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;NIO&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-file-size&gt;10M&lt;/journal-file-size&gt;
  
        &lt;journal-buffer-timeout&gt;1160000&lt;/journal-buffer-timeout&gt;
  
  
        &lt;!--
          When using ASYNCIO, this will determine the writing queue depth for libaio.
         --&gt;
        &lt;journal-max-io&gt;1&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;connectors&gt;
          &lt;!-- Connector used to be announced through cluster connections and notifications --&gt;
          &lt;connector name="artemis-master-2"&gt;tcp://localhost:61718&lt;/connector&gt;        &lt;!--        &lt;connector name="artemis-slave-1"&gt;tcp://localhost:61617&lt;/connector&gt;         --&gt;
      &lt;/connectors&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;!-- 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="artemis"&gt;tcp://localhost:61718?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300&lt;/acceptor&gt;
  
           &lt;!-- AMQP Acceptor.  Listens on default AMQP port for AMQP traffic.--&gt;
           &lt;acceptor name="amqp"&gt;tcp://localhost:5772?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300&lt;/acceptor&gt;
  
           &lt;!-- STOMP Acceptor. --&gt;
           &lt;acceptor name="stomp"&gt;tcp://localhost:61713?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="hornetq"&gt;tcp://localhost:5545?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true&lt;/acceptor&gt;
  
           &lt;!-- MQTT Acceptor --&gt;
           &lt;acceptor name="mqtt"&gt;tcp://localhost:1983?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true&lt;/acceptor&gt;
  
        &lt;/acceptors&gt;
  
  
        &lt;cluster-user&gt;admin&lt;/cluster-user&gt;
  
        &lt;cluster-password&gt;admin&lt;/cluster-password&gt;
  
        &lt;broadcast-groups&gt;
           &lt;broadcast-group name="bg-group1"&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;1803&lt;/broadcast-period&gt;
              &lt;connector-ref&gt;artemis-master-2&lt;/connector-ref&gt;
           &lt;/broadcast-group&gt;
        &lt;/broadcast-groups&gt;
  
        &lt;discovery-groups&gt;
           &lt;discovery-group name="dg-group1"&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;8003&lt;/refresh-timeout&gt;
           &lt;/discovery-group&gt;
        &lt;/discovery-groups&gt;
  
        &lt;cluster-connections&gt;
           &lt;cluster-connection name="my-cluster"&gt;
              &lt;connector-ref&gt;artemis-master-2&lt;/connector-ref&gt;
              &lt;check-period&gt;800&lt;/check-period&gt;
              &lt;connection-ttl&gt;2003&lt;/connection-ttl&gt;
              &lt;initial-connect-attempts&gt;4&lt;/initial-connect-attempts&gt;
              &lt;reconnect-attempts&gt;1&lt;/reconnect-attempts&gt;
              &lt;message-load-balancing&gt;ON_DEMAND&lt;/message-load-balancing&gt;
              &lt;max-hops&gt;1&lt;/max-hops&gt;
              &lt;notification-interval&gt;500&lt;/notification-interval&gt;
              &lt;notification-attempts&gt;1&lt;/notification-attempts&gt;
              &lt;discovery-group-ref discovery-group-name="dg-group1"/&gt;
           &lt;/cluster-connection&gt;
        &lt;/cluster-connections&gt;
  
  
        &lt;ha-policy&gt;
          &lt;replication&gt;
              &lt;master&gt;
                &lt;group-name&gt;grappe-2&lt;/group-name&gt;
                &lt;check-for-live-server&gt;true&lt;/check-for-live-server&gt;
              &lt;/master&gt;
          &lt;/replication&gt;
        &lt;/ha-policy&gt;
  
        &lt;security-settings&gt;
           &lt;security-setting match="#"&gt;
              &lt;permission type="createNonDurableQueue" roles="amq"/&gt;
              &lt;permission type="deleteNonDurableQueue" roles="amq"/&gt;
              &lt;permission type="createDurableQueue" roles="amq"/&gt;
              &lt;permission type="deleteDurableQueue" roles="amq"/&gt;
              &lt;permission type="createAddress" roles="amq"/&gt;
              &lt;permission type="deleteAddress" roles="amq"/&gt;
              &lt;permission type="consume" roles="amq"/&gt;
              &lt;permission type="browse" roles="amq"/&gt;
              &lt;permission type="send" roles="amq"/&gt;
              &lt;!-- we need this otherwise ./artemis data imp wouldn't work --&gt;
              &lt;permission type="manage" roles="amq"/&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="activemq.management#"&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="#"&gt;
              &lt;redistribution-delay&gt;5000&lt;/redistribution-delay&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="DLQ"&gt;
              &lt;anycast&gt;
                 &lt;queue name="DLQ" /&gt;
              &lt;/anycast&gt;
           &lt;/address&gt;
           &lt;address name="ExpiryQueue"&gt;
              &lt;anycast&gt;
                 &lt;queue name="ExpiryQueue" /&gt;
              &lt;/anycast&gt;
           &lt;/address&gt;
  
        &lt;/addresses&gt;
      &lt;/core&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>properties used for jndi lookups</p>
  
  <pre><code>java.naming.factory.initial:org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
  java.naming.provider.url: udp://231.7.7.7:9876
  connectionFactory.ConnectionFactory: udp://231.7.7.7:9876?type=CF&amp;refreshTimeout=800&amp;retryInterval=1111&amp;reconnectAttempts=3&amp;connectionTtl=6000&amp;connection-ttl-check-interval=600&amp;clientFailureCheckPeriod=5000&amp;initialConnectAttempts=9&amp;discoveryGroupRef=dg-group-1&amp;connection-load-balancing-policy-class-name=org.apache.activemq.artemis.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy
  </code></pre>