Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

MQTT Over WebSocket Transport Coming to ActiveMQ 5.9

DZone's Guide to

MQTT Over WebSocket Transport Coming to ActiveMQ 5.9

· Integration Zone
Free Resource

Modernize your application architectures with microservices and APIs with best practices from this free virtual summit series. Brought to you in partnership with CA Technologies.

So, we have more and more users that want to connect to ActiveMQ directly from the browser using WebSockets. For quite a while now we supported Stomp clients which are really easy to use from JavaScript. Now, as more mobile users are trying the same approach, we added support for the very efficient binary MQTT protocol to the mix for ActiveMQ 5.9.0.

The good thing is that you really don’t have to change anything on the broker side to support it. Both Stomp and MQTT can work over the same connector, as clients identify the protocol they want to use when they initialize the connection. We also provided a nice little demo using Eclipse Paho JavaScript client. You can play with the demo if you start the broker with activemq-demo.xml config like

bin/activemq console xbean:conf/activemq-demo.xml

And go to the

http://localhost:8161/demo/mqtt/

You can also peek at the source code

If you’re interested in messaging for web and mobile, I’ll be talking more about Stomp, MQTT, WebSocket and other stuff at OSCON later this July, so pop by if you can. Happy messaging!

The Integration Zone is proudly sponsored by CA Technologies. Learn from expert microservices and API presentations at the Modernizing Application Architectures Virtual Summit Series.

Topics:

Published at DZone with permission of Dejan Bosanac, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}