From 981b516479947cb4b2878ceb4b4dacc82a6c02fa Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Thu, 29 Oct 2020 22:04:33 -0400 Subject: [PATCH] ARTEMIS-2968 Ignoring expected exception when deleting a previously already removed queue --- .../amqp/connect/mirror/AMQPMirrorControllerTarget.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerTarget.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerTarget.java index 88333b3d09..9f26f57917 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerTarget.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerTarget.java @@ -22,6 +22,7 @@ import java.util.Map; import java.util.function.ToLongFunction; import java.util.stream.Stream; +import org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException; import org.apache.activemq.artemis.api.core.Message; import org.apache.activemq.artemis.api.core.QueueConfiguration; import org.apache.activemq.artemis.api.core.SimpleString; @@ -276,7 +277,11 @@ public class AMQPMirrorControllerTarget extends ProtonAbstractReceiver implement if (logger.isDebugEnabled()) { logger.debug("destroy queue " + queueName + " on address = " + addressName); } - server.destroyQueue(queueName); + try { + server.destroyQueue(queueName); + } catch (ActiveMQNonExistentQueueException expected) { + logger.debug("queue " + queueName + " was previously removed", expected); + } } private static ToLongFunction referenceIDSupplier = (source) -> {