Can my device run MQTT? Is my device MQTT compatible? This is a common question that you'll get when you first hear about MQTT. So here's a list of points that you need to look out for to help you decide on using MQTT:
1. Is my device having TCP/IP or networking support?
- If you are looking at using MQTT to communicate with a server or some external device, then the basic component that you need is some sort of networking. MQTT is uses TCP/IP layer that is provided by the operating system. You can also look at MQTT-S protocol if zigbee networks are used. TCP/IP is generally available on all the operating systems. Some operating systems like linux and Windows provides guidelines on configuring it to suite your needs.
2. Is there some memory and disk space available on device?
Every program needs some memory to run, so an application that will use MQTT will also need some memory. On the disk, the MQTT client implementation needs to hosted before its loaded by the program. Secondly, if the client needs disk persistence in case of sending QoS 1 or QoS 2 messages, there will be some disk storage or non-volatile memory needed.
3. Is a ready made MQTT client that can used on the device platform?
You can search for various platforms on which MQTT client libraries are available. Also there are Java client and C clients available with WebSphere MQ Telemetry on several platform. If MQTT client is not readily available for use on the device platform you will need to write a simple MQTT client implementation. That is only the MQTT implementation for the client needs to be developed. It can connect to WebSphere MQ Telemetry Server. The client implementation for a specific purpose need not be a complete implementation. For example, if the purpose is to send only QoS 0 messages, the QoS 1 and QoS 2 support need not be implemented. Here is the link to MQTT protocol specification: http://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/mqtt-v3r1.html
4. Is there a network connectivity to the server?
The network connectivity to the server may not be available all the time from the device. So when a message is sent there may not be connectivity. Either the application sending the message needs to show an error if the message can't be sent at that time or there needs to be a small file or database that can store the message data and send it later point of time or there needs to be a telemetry daemon or Lotus Expeditor micro broker used on the device.
Well along with this there is a MQTT server that's required to accept MQTT connections from the devices. WebSphere MQ 7.1 now has WebSphere MQ Telemetry integrated.
Disclaimer: Each posting on this site is the view of its author and does not necessarily represent IBM’s positions, strategies or opinions.I do not guarantee correctness of the opinions or content or sample code presented here. Use it at your own risk.