I'm trying to connect an Android application to an ActiveMQ server.
I'm using ActiveMQ because my server already talks to the ActiveMQ server using JMS so it will be very beneficial for me to connect the android client to the JMS broker.
I've enabled MQTT in ActiveMQ following this page: http://activemq.apache.org/mqtt.html
and I had a small problem with any of the MQTT clients (IBM MQTT client or Paho MQTT Client) I've downloaded didn't recognize "mqtt://" url prefix so I tried to use tcp instead. This is how the configuration looks like in activemq.xml:
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireformat.maxFrameSize=104857600"/>
<transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600"/>
<transportConnector name="mqtt" uri="tcp://0.0.0.0:1883"/>
2013-09-05 12:34:17,550 | WARN | Transport Connection to: tcp://192.168.0.111:42148 failed: java.io.IOException: Unknown data type: 77 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///192.168.0.111:42148@1883
You haven't configured the MQTT transportConnector properly. Try this:
<transportConnectors> <transportConnector name="mqtt" uri="mqtt://localhost:1883"/> </transportConnectors>
Notice that in yours you used the
TCP uri prefix.