Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-7102

config-delete-queues doesn't always work as expected

XMLWordPrintable

    • False
    • None
    • False
    • Hide

      1. Configure a new broker with the attached broker.xml
      2. Copy attached broker-addresses.xml to the broker etc/ directory as broker-addresses.xml
      3. Start the broker and allow the addresses to deploy. Verify expected addresses / queues in console
      4. Stop the broker
      5. Copy the attached broker-addresses2.xml to the broker etc/ directory as broker-addresses.xml
      6. Start the broker and check the addresses
      7. Both old multicast queues and new anycast queues remain on the broker. The multicast queues are not deleted, as in the attached image

      Show
      1. Configure a new broker with the attached broker.xml 2. Copy attached broker-addresses.xml to the broker etc/ directory as broker-addresses.xml 3. Start the broker and allow the addresses to deploy. Verify expected addresses / queues in console 4. Stop the broker 5. Copy the attached broker-addresses2.xml to the broker etc/ directory as broker-addresses.xml 6. Start the broker and check the addresses 7. Both old multicast queues and new anycast queues remain on the broker. The multicast queues are not deleted, as in the attached image

      Setting config-delete-queues + config-delete-addresses seems not to work as expected in the use case where the original multicast address remains, but the fixed queues within the multicast address are moved to anycast addresses. Consider the following case:

      We start with two multicast addresses, like so:

      <addresses xmlns="urn:activemq:core">
               <address name="DLQ">
                  <anycast>
                     <queue name="DLQ" />
                  </anycast>
               </address>
               <address name="ExpiryQueue">
                  <anycast>
                     <queue name="ExpiryQueue" />
                  </anycast>
               </address>
               <address name="TEST.QUEUE.0">
                  <multicast>
                     <queue name="TEST.QUEUE.0.1"/>
                     <queue name="TEST.QUEUE.0.2"/>
                  </multicast>
               </address>
               <address name="TEST.QUEUE.1">
      	    <multicast>
                     <queue name="TEST.QUEUE.1.1"/>
                     <queue name="TEST.QUEUE.1.2"/>
                  </multicast>
               </address>   
      </addresses>
      

      We change the addresses to move the internal queues out of the multicast addresses and to anycast addresses, but keeping the original multicast addresses themselves, like so:

      <addresses xmlns="urn:activemq:core">
               <address name="DLQ">
                  <anycast>
                     <queue name="DLQ" />
                  </anycast>
               </address>
               <address name="ExpiryQueue">
                  <anycast>
                     <queue name="ExpiryQueue" />
                  </anycast>
               </address>
               <address name="TEST.QUEUE.0">
                  <multicast>
                     <queue name="TEST.QUEUE.0"/> 
                  </multicast>
               </address>
               <address name="TEST.QUEUE.1">
      	    <multicast>
                     <queue name="TEST.QUEUE.1"/>
                  </multicast>
               </address>
               <address name="TEST.QUEUE.0.1">
                  <anycast>
                     <queue name="TEST.QUEUE.0.1"/>
                  </anycast>
               </address>         
               <address name="TEST.QUEUE.0.2">
                  <anycast>
                     <queue name="TEST.QUEUE.0.2"/>
                  </anycast>
               </address>
               <address name="TEST.QUEUE.1.1">
                  <anycast>
                     <queue name="TEST.QUEUE.1.1"/>
                  </anycast>
               </address>
               <address name="TEST.QUEUE.1.2">
                  <anycast>
                     <queue name="TEST.QUEUE.1.2"/>
                  </anycast>
               </address>    
      </addresses>
      

      We end up with the queues remaining in the multicast addresses, along with new anycast queues of the same name as anycast queues.

        1. orphan-queues.png
          orphan-queues.png
          118 kB
        2. broker-addresses.xml
          0.7 kB
        3. broker-addresses2.xml
          1 kB
        4. broker.xml
          12 kB
        5. image-1.png
          image-1.png
          115 kB
        6. Producer.java
          1 kB

              dbruscin Domenico Francesco Bruscino
              rhn-support-dhawkins Duane Hawkins
              Michal Toth Michal Toth
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: