Shrikant Chavan created ARTEMIS-3589:
----------------------------------------

             Summary: Deletion of diverts addresses not working
                 Key: ARTEMIS-3589
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3589
             Project: ActiveMQ Artemis
          Issue Type: Bug
          Components: Broker
    Affects Versions: 2.19.0
         Environment: Step 1: Create a single node AMQ broker with any type of 
storage.

Step 2: Create broker.xml with following configurations:
{code:java}
<addresses>
    <address name="DLQ">
       <anycast>
          <queue name="DLQ" />
       </anycast>
    </address>
    <address name="EXP">
       <anycast>
          <queue name="EXP" />
       </anycast>
    </address>    <address name="TestQ1">
        <anycast>
           <queue name="TestQ1"/>
        </anycast>
    </address>
    <address name="TestQ2">
        <anycast>
           <queue name="TestQ2"/>
        </anycast>
    </address>
    <address name="TestQ3">
        <anycast>
           <queue name="TestQ3"/>
        </anycast>
    </address>
</addresses> 

<address-settings>
    <!-- if you define auto-create on certain queues, management has to be 
auto-create -->
    <address-setting match="activemq.management#">
        <dead-letter-address>DLQ</dead-letter-address>
        <expiry-address>EXP</expiry-address>
        <redelivery-delay>0</redelivery-delay>
        <!-- with -1 only the global-max-size is in use for limiting -->
        <max-size-bytes>-1</max-size-bytes>
        
<message-counter-history-day-limit>10</message-counter-history-day-limit>
        <address-full-policy>PAGE</address-full-policy>
        <auto-create-queues>true</auto-create-queues>
        <auto-create-addresses>true</auto-create-addresses>
    </address-setting>
    <!--default for catch all-->
    <address-setting match="#">
        <dead-letter-address>DLQ</dead-letter-address>
        <expiry-address>EXP</expiry-address>
        <redelivery-delay>0</redelivery-delay>
        <!-- with -1 only the global-max-size is in use for limiting -->
        <max-size-bytes>-1</max-size-bytes>
        
<message-counter-history-day-limit>10</message-counter-history-day-limit>
        <address-full-policy>PAGE</address-full-policy>
        <auto-create-queues>false</auto-create-queues>
        <auto-create-addresses>false</auto-create-addresses>
        <config-delete-queues>FORCE</config-delete-queues>
        <config-delete-addresses>FORCE</config-delete-addresses>
        <config-delete-diverts>FORCE</config-delete-diverts>
        <redistribution-delay>0</redistribution-delay>
        <auto-delete-queues>false</auto-delete-queues>
        <auto-delete-addresses>false</auto-delete-addresses>
    </address-setting>
    <address-setting match="TestQ2">
        <expiry-delay>345600000</expiry-delay>
        <expiry-address></expiry-address>
    </address-setting>
    <address-setting match="TestQ1">
        <dead-letter-address>TestQ3</dead-letter-address>
    </address-setting>
</address-settings>

<diverts>
    <divert name="DIVERT.TestQ1">
        <address>TestQ1</address>
        <forwarding-address>TestQ2</forwarding-address>
        <routing-type>PASS</routing-type>
        <exclusive>false</exclusive>
    </divert>
</diverts>  {code}
Step 3: Start the amq broker
 
Step 4: Verify that the divert is visible is in the jolokia console under TestQ1
 
Step 5: Send few messages on the TestQ1
 
Step 6: Verify that the messages are diverted to the TestQ2 as well using the 
jolokia console or the queue stat command.

Step 7: Delete the divert from broker.xml

Step 8: broker artemis logs will show that the configurations are reloaded

 
Step 9: The divert is still available in the jolokia console

Step 10: Send messages on the TestQ1. The messages are diverted to TestQ2

Step 11: Restart the amq broker. The divert is still visible on the jolokia 
console.
            Reporter: Shrikant Chavan
         Attachments: etc.zip

The child address setting does not follow config-delete-diverts property 
defined in parent address setting. When the diverts are deleted manually from 
the file, it remains after broker reload too.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to