From 95443543e74da534d6c6a144d7c953e2ace7799e Mon Sep 17 00:00:00 2001 From: Dejan Bosanac Date: Mon, 5 Oct 2015 12:55:25 +0200 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-5997 - support legacy clients (cherry picked from commit b83c38b04c3e4330e6d5f57e4c5d7f3fd62942f0) --- .../apache/activemq/transport/mqtt/MQTTProtocolConverter.java | 3 +++ pom.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java b/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java index b83dd278c0..5998938233 100644 --- a/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java +++ b/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java @@ -376,6 +376,9 @@ public class MQTTProtocolConverter { public void onUnSubscribe(UNSUBSCRIBE command) throws MQTTProtocolException { checkConnected(); + if (command.qos() != QoS.AT_LEAST_ONCE && (version != V3_1 || publishDollarTopics != true)) { + throw new MQTTProtocolException("Failed to process unsubscribe request", true, new Exception("UNSUBSCRIBE frame not properly formatted, QoS")); + } UTF8Buffer[] topics = command.topics(); if (topics != null) { for (UTF8Buffer topic : topics) { diff --git a/pom.xml b/pom.xml index b3d401577a..658b6d0214 100755 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ 1.8 1.2.17 1.10.17 - 1.10 + 1.12 1.2.0 10.11.1.1 4.3.1