From 6466ae2bcfa8831d79f71e94709b0511dc1367cf Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Wed, 14 Jan 2015 16:47:41 +0000 Subject: [PATCH] AMQ-5519: use the NOT_FOUND error condition when failing to find a DurableSubscription https://issues.apache.org/jira/browse/AMQ-5519 --- .../apache/activemq/transport/amqp/AmqpProtocolConverter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java index d623f4ede0..238b8b0dbf 100644 --- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java +++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java @@ -30,6 +30,7 @@ import java.util.concurrent.ConcurrentHashMap; import javax.jms.Destination; import javax.jms.InvalidClientIDException; +import javax.jms.InvalidDestinationException; import javax.jms.InvalidSelectorException; import org.apache.activemq.broker.BrokerService; @@ -1335,6 +1336,8 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter { Throwable exception = ((ExceptionResponse) response).getException(); if (exception instanceof SecurityException) { sender.setCondition(new ErrorCondition(AmqpError.UNAUTHORIZED_ACCESS, exception.getMessage())); + } else if (exception instanceof InvalidDestinationException){ + sender.setCondition(new ErrorCondition(AmqpError.NOT_FOUND, exception.getMessage())); } else { sender.setCondition(new ErrorCondition(AmqpError.INTERNAL_ERROR, exception.getMessage())); }