activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [01/29] git commit: Implements AMQ-4990: Add support for the changes in MQTT 3.1.1
Date Thu, 20 Mar 2014 17:44:12 GMT
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.9 aee5ff45f -> 50abbc35b


Implements AMQ-4990: Add support for the changes in MQTT 3.1.1


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/17823427
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/17823427
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/17823427

Branch: refs/heads/activemq-5.9
Commit: 17823427cb0e21a0455593203f890c7d659874c5
Parents: aee5ff4
Author: Hiram Chirino <hiram@hiramchirino.com>
Authored: Thu Jan 23 13:23:01 2014 -0500
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Thu Mar 20 13:01:56 2014 -0400

----------------------------------------------------------------------
 .../transport/mqtt/MQTTProtocolConverter.java         |  7 ++++---
 .../org/apache/activemq/transport/mqtt/MQTTTest.java  | 14 +++++++++++++-
 pom.xml                                               |  4 ++--
 3 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/17823427/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java
----------------------------------------------------------------------
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 ac598e7..6d7d829 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
@@ -154,12 +154,13 @@ public class MQTTProtocolConverter {
                 break;
             }
             case CONNECT.TYPE: {
-                onMQTTConnect(new CONNECT().decode(frame));
-                LOG.debug("MQTT Client " + getClientId() + " connected.");
+                CONNECT connect = new CONNECT().decode(frame);
+                onMQTTConnect(connect);
+                LOG.debug("MQTT Client {} connected. (version: {})", getClientId(), connect.version());
                 break;
             }
             case DISCONNECT.TYPE: {
-                LOG.debug("MQTT Client " + getClientId() + " disconnecting");
+                LOG.debug("MQTT Client {} disconnecting", getClientId());
                 onMQTTDisconnect();
                 break;
             }

http://git-wip-us.apache.org/repos/asf/activemq/blob/17823427/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java
----------------------------------------------------------------------
diff --git a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java
b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java
index 221abf3..850a8e0 100644
--- a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java
+++ b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java
@@ -325,9 +325,21 @@ public class MQTTTest extends AbstractMQTTTest {
 
             @Override
             public void debug(String message, Object... args) {
-                LOG.info(message, args);
+                LOG.info(String.format(message, args));
             }
         };
     }
 
+    @Test(timeout=60 * 1000)
+    public void testMQTT311Connection()throws Exception{
+        addMQTTConnector();
+        brokerService.start();
+        MQTT mqtt = createMQTTConnection();
+        mqtt.setClientId("foo");
+        mqtt.setVersion("3.1.1");
+        final BlockingConnection connection = mqtt.blockingConnection();
+        connection.connect();
+        connection.disconnect();
+    }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/17823427/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5b1680d..e5c6d1a 100755
--- a/pom.xml
+++ b/pom.xml
@@ -64,7 +64,7 @@
     <geronimo-version>1.0</geronimo-version>
     <hadoop-version>1.0.0</hadoop-version>
     <hawtbuf-version>1.9</hawtbuf-version>
-    <hawtdispatch-version>1.18</hawtdispatch-version>
+    <hawtdispatch-version>1.19</hawtdispatch-version>
     <howl-version>0.1.8</howl-version>
     <hsqldb-version>1.8.0.12</hsqldb-version>
     <httpclient-version>4.2.5</httpclient-version>
@@ -90,7 +90,7 @@
     <leveldb-version>0.6</leveldb-version>
     <leveldbjni-version>1.8</leveldbjni-version>
     <log4j-version>1.2.17</log4j-version>
-    <mqtt-client-version>1.6</mqtt-client-version>
+    <mqtt-client-version>1.7</mqtt-client-version>
     <openjpa-version>1.2.0</openjpa-version>
     <opensymphony-version>2.4.2</opensymphony-version>
     <org-apache-derby-version>10.10.1.1</org-apache-derby-version>


Mime
View raw message