mirror of https://github.com/apache/activemq.git
Implements AMQ-4990: Add support for the changes in MQTT 3.1.1
This commit is contained in:
parent
95d20e5b47
commit
ad3041034b
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
4
pom.xml
4
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>
|
||||
|
|
Loading…
Reference in New Issue