What is MQTT and how does it work with WebSphere MQ?
ValerieLampkin 27000182R2 Comments (5) Visits (110509)
Even some WebSphere MQ veterans may be unfamiliar with the term MQTT (MQ Telemetry Transport) although they probably are affected by it in their everyday lives. Do you receive Facebook Messenger notices on your smartphone? If so, then it’s likely you’re getting that notification through the MQTT protocol. The protocol was invented by Dr Andy Stanford-Clark of IBM, and Arlen Nipper of Arcom (now Eurotech), and is openly published with a royalty-free license. MQTT is included as the MQ Telemetry component of WebSphere MQ version 7.1 software (Telemetry support is available as an additional installation with MQ v7.0.1). I’ve recently been working as part of a team to create a new IBM Redbooks publication Building Smarter Planet Solutions with MQTT and WebSphere MQ due to be published this Spring. I’d like to share with you some of the features and capabilities of MQTT which can provide endless possibilities for smart solutions.
MQ Telemetry Transport (MQTT) is a lightweight network protocol used for publish/subscribe messaging between devices. The "MQ Integrator SCADA Device Protocol" is an old name for what is now known as MQTT. MQTT is designed to be open, simple and easy to implement, allowing thousands of lightweight clients to be supported by a single server. These characteristics make it ideal for use in constrained environments or low-bandwidth networks with limited processing capabilities, small memory capacities and high latency. The MQTT design minimizes network bandwidth requirements while attempting to ensure reliability of delivery.
As technology evolves, more devices connect to each other across the internet evolving into what has sometimes been called the "internet of things". The messages sent from one place to another can be interpreted and acted upon intelligently by a machine, rather than with human intervention.
MQTT is a technology capable of connecting all these remote data-collecting devices. The Extended Reach (XR component) of WebSphere MQ enables devices at the edge of the network to connect into the messaging backbone. With the new capability devices such as smart energy meters, phones, cars, trains, satellite locations, and personal health care devices can now be connected, enabling transmissions from remote sensors to reach the central systems for processing and for control commands to be sent out to the devices.
Embedded sensor instrumentation can measure the condition of devices and exchange that data with other machines, enabling analysis and response to the data in real time. This may include tiny passive or intelligent devices which may have low bandwidth and unreliable networks such as radio-frequency identification (RFID) chips which can be embedded in everyday things such as ID cards. Having the ability to use small hardware which can utilize MQTT technology to connect to the internet allows everyday objects to transport data from one device to another. These tiny devices publish messages which then using the MQTT protocol are received by the subscribers and may trigger an event based on the data received.
Some very real and useful examples of ways to exploit the MQTT technology can be the use of hardware chips to transmit information for health care monitoring of pacemakers, energy meters, cars/trucks, etc.
MQTT machine to machine example (click image to enlarge)
The Quality of Service (QoS) feature allows the MQTT protocol to provide traditional messaging qualities of service when the environment allows. You could compare QoS to sending a letter. You might send it through normal US mail with no confirmation or you might opt to use a courier service that assures delivery. There are 3 options for QoS:
Why include WebSphere MQ in your topology with MQTT? As a robust product, WebSphere MQ provides secure messaging features that can be scaled to include thousands of clients and interface with other technology within the enterprise such as Message Broker and WebSphere Application Server, just to name a few. Integrating WebSphere MQ with MQTT allows for scalability, reliability, and security across a wide variety of platforms. MQ can facilitate mission critical MQTT applications.
Basic MQTT is a Pub/Sub architecture while WebSphere MQ can provide either Pub/Sub or point-to-point message delivery. Messages received from MQTT clients can be forwarded to message queues which are then available for application processing. By incorporating this functionality of MQ, messages which originally were transmitted from MQTT are then converted to MQ messages utilizing MQ assured delivery to verify messages are delivered once and once only, irrespective of errors and network problems.
WebSphere MQ architecture (click image to enlarge)
For more information about MQTT, check out http