This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new be41019 ARTEMIS-2760 Filter AddressQueueReaper misleading error
messages
new e14ff38 This closes #3132
be41019 is described below
commit be41019b50a12e237ece2c64006a829720f1148d
Author: brusdev <[email protected]>
AuthorDate: Wed May 13 18:18:35 2020 +0200
ARTEMIS-2760 Filter AddressQueueReaper misleading error messages
---
.../artemis/core/postoffice/impl/PostOfficeImpl.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
index 7f207c9..67564bb 100644
---
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
+++
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
@@ -32,9 +32,11 @@ import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
+import
org.apache.activemq.artemis.api.core.ActiveMQAddressDoesNotExistException;
import org.apache.activemq.artemis.api.core.ActiveMQAddressFullException;
import org.apache.activemq.artemis.api.core.ActiveMQDuplicateIdException;
import org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException;
+import org.apache.activemq.artemis.api.core.ActiveMQShutdownException;
import org.apache.activemq.artemis.api.core.Message;
import org.apache.activemq.artemis.api.core.Pair;
import org.apache.activemq.artemis.api.core.QueueConfiguration;
@@ -1744,8 +1746,19 @@ public class PostOfficeImpl implements PostOffice,
NotificationListener, Binding
server.removeAddressInfo(address, null);
}
+ } catch (ActiveMQShutdownException e) {
+ // the address and queue reaper is asynchronous so it may happen
+ // that the broker is shutting down while the reaper iterates
+ // through the addresses, next restart this operation will be
retried
+ logger.debug(e.getMessage(), e);
} catch (Exception e) {
- ActiveMQServerLogger.LOGGER.errorRemovingAutoCreatedQueue(e,
address);
+ if (e instanceof ActiveMQAddressDoesNotExistException &&
getAddressInfo(address) == null) {
+ // the address and queue reaper is asynchronous so it may
happen
+ // that the address is removed before the reaper removes it
+ logger.debug(e.getMessage(), e);
+ } else {
+ ActiveMQServerLogger.LOGGER.errorRemovingAutoCreatedQueue(e,
address);
+ }
}
}
}