Activemq 5.9 will support websocket-based mqtt Protocol Transmission
Author: chszs, reprinted with note. Blog homepage:Http://blog.csdn.net/chszs
More and more users want to use a browser to directly connect to the activemq server through websockets. After a long period of time, we have supported the stomp client, which can be used from JavaScript. Now, more mobile users try the same way. We have added support for more efficient binary mqtt protocol in activemq 5.9.
The good news is that you don't have to modify anything on the broker.CodeMqtt, stomp, and mqtt can all work on the same connector. When the client initializes the connection, the client recognizes the protocol they want to use. We also provided a good demo-using the PAHO JavaScript client of Eclipse. Use git to get the code down.
Http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.javascript.git/
Run
Bin/activemq console xbean: CONF/activemq-demo.xml
Visit the following address:
Http: // localhost: 8161/demo/mqtt/
Source code here: https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-web-demo/src/main/webapp/mqtt? HB = true
If you are interested in sending messages to the Web and mobile terminals, you can see moreArticle:
Http://www.oscon.com/oscon2013/public/schedule/detail/28103