diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java index 7b2bde17ce..fdbfc6919b 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java @@ -70,6 +70,9 @@ public class Subscription { MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1); format.enqueueCommand(ack); } + else { + throw new JMSException("Unknown ackMode: " + ackMode); + } FrameBuilder builder = new FrameBuilder(Stomp.Responses.MESSAGE);