activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject git commit: Implements AMQ-4990: Add support for the changes in MQTT 3.1.1
Date Fri, 24 Jan 2014 14:18:20 GMT
Updated Branches:
  refs/heads/trunk 95d20e5b4 -> ad3041034


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/ad304103
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/ad304103
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/ad304103

Branch: refs/heads/trunk
Commit: ad3041034b3a0d126575297821425f7bbca977f0
Parents: 95d20e5
Author: Hiram Chirino <hiram@hiramchirino.com>
Authored: Thu Jan 23 13:23:01 2014 -0500
Committer: Hiram Chirino <hiram@hiramchirino.com>
Committed: Fri Jan 24 09:18:12 2014 -0500

----------------------------------------------------------------------
 .../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/ad304103/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 34f53a4..9c6fa12 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
@@ -124,12 +124,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/ad304103/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 bf4fac5..64a9b5f 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
@@ -668,9 +668,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/ad304103/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 645c353..e3a0b3c 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