activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmytro Pishchukhin <>
Subject Unable to connect/send messages with MQTT transport from JMS client
Date Thu, 24 May 2012 10:29:26 GMT

I'm trying to use MQTT protocol between ActiveMQ broker and JMS client.

Broker is started with MQTT transport: <transportConnector name="mqtt"
One queue and one topic are configured.

1. For testing I use HermesJMS tool. I've configured the tool with
MQTT jars (from /apache-activemq-5.6.0/lib/optional folder) and
brockerURL: mqtt://localhost:61616
When I try to open connection (just open an queue tab-panel) I receive
such exception:

	at org.apache.activemq.util.JMSExceptionSupport.create(
	at org.apache.activemq.ActiveMQConnection.syncSendPacket(
	at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(
	at org.apache.activemq.ActiveMQConnection.setClientID(
	at hermes.impl.jms.ConnectionManagerSupport.createConnection(
Caused by:
	at org.apache.activemq.transport.mqtt.MQTTWireFormat.unmarshal(
	at org.apache.activemq.transport.tcp.TcpTransport.readCommand(
	at org.apache.activemq.transport.tcp.TcpTransport.doRun(
	... 1 more

Broker logs:
WARN | Transport Connection to: tcp:// failed:
org.apache.activemq.transport.InactivityIOException: Channel was
inactive for too (>30000) long: tcp://

2. I've tried to test with my small test client based on ActiveMQ
without any success.
2.1. with mqtt://localhost:61616
2012-05-24 12:22:03.029 [FINE]
Do not know how to process ActiveMQ Command ConnectionInfo {commandId
= 1, responseRequired = true, connectionId =
ID:BK5N00025814-8614-1337854948615-2:1, clientId =
ID:BK5N00025814-8614-1337854948615-1:1, clientIp = null, userName =
null, password = *****, brokerPath = null, brokerMasterConnector =
false, manageable = true, clientMaster = true, faultTolerant = false,
failoverReconnect = false}

2.2. with failover://(mqtt://localhost:61616) it always tries to
reconnect after approx. 30 seconds.

3. When I tried to send messages from MQTT client
(mqtt-client-1.2-uber.jar) - everything was fine.

Are there any tricks in configuration of MQTT protocol for ActiveMQ
JMS clients? I did find any information on the documentation page.

Thanks in advance.

Best regards,
Dmytro Pishchukhin

View raw message