[ 
https://issues.apache.org/jira/browse/ARTEMIS-3541?focusedWorklogId=670739&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-670739
 ]

ASF GitHub Bot logged work on ARTEMIS-3541:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Oct/21 13:50
            Start Date: 27/Oct/21 13:50
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on a change in pull request 
#3819:
URL: https://github.com/apache/activemq-artemis/pull/3819#discussion_r737488446



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
##########
@@ -2397,15 +2397,13 @@ public void destroyQueue(final SimpleString queueName,
             callBrokerQueuePlugins(plugin -> plugin.afterDestroyQueue(queue, 
address, session, checkConsumerCount, removeConsumers, autoDeleteAddress));
          }
 
-         if (queue.isTemporary()) {
-            AddressInfo addressInfo = getAddressInfo(address);
+         AddressInfo addressInfo = getAddressInfo(address);
 
-            if (autoDeleteAddress && postOffice != null && addressInfo != null 
&& addressInfo.isAutoCreated() && !isAddressBound(address.toString()) && 
addressSettingsRepository.getMatch(address.toString()).getAutoDeleteAddressesDelay()
 == 0) {
-               try {
-                  removeAddressInfo(address, session);
-               } catch (ActiveMQDeleteAddressException e) {
-                  // Could be thrown if the address has bindings or is not 
deletable.
-               }
+         if (autoDeleteAddress && postOffice != null && addressInfo != null && 
addressInfo.isAutoCreated() && !isAddressBound(address.toString()) && 
addressSettingsRepository.getMatch(address.toString()).getAutoDeleteAddressesDelay()
 == 0) {

Review comment:
       I wouldn't do that here.
   
   Removing auto-created queues immediately could break a lot of stuff.
   
   you should instead make sure the AddressReaper would remove such addresses.. 
I would revert this fix here and would add a check for auto-delete address on 
the reaper.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 670739)
    Time Spent: 40m  (was: 0.5h)

> createQueue ignoring autoDeleteAddress flag
> -------------------------------------------
>
>                 Key: ARTEMIS-3541
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3541
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to