10.8.2. Streaming data processing using an IoT/MQTT source/sink

<< Click to Display Table of Contents >>

Navigation:  10. FAQ > 10.8. Web Service, Real-time Data Streaming and Master Data Management >

10.8.2. Streaming data processing using an IoT/MQTT source/sink

 

An Alternative to the AN76E5~1_img294 NaïveIPServer action to stream data in real-time within Anatella is the AN76E5~1_img296 MQTSubscribe action. MQTT is the most common IoT protocol and is 100% supported by Anatella. Here are the main differences between the MQTT protocol (supported by the AN76E5~1_img296 MQTSubscribe action) and the HTTP protocol (supported by the AN76E5~1_img294 NaïveIPServer action):

 

Topic

MQTT Protocol

HTTP Protocol

Comments

Infrastructure

Complex

Simple

When using MQTT, you need to manage and maintain a MQTT broker. HTTP is much simpler and does not require a third party software.

Resilience

High

Medium

MQTT supports the Level 3 Quality of Service (Level 3 QoS) that offers strong guarantees on messages delivery.

Protocol Overhead

Tiny Headers

Big Headers

The header size of the MQTT protocol is just from 2 to 4 bytes while the HTTP headers are much bigger (typically, from 150 to 250 bytes).

Easy to use

Medium

High

There now exists plenty of low-level libraries that allows to use the MQTT protocol but nothing beats in simplicity the simple usage of HTTP (e.g. using cURL or any browser to send HTTP messages is too easy!).

 

 
 

From the point-of-view of Anatella, using the MQTT or HTPP protocol is equivalent: Everything that you can do with one protocol, you can do with the other:

 

clip0399

 

For example, this Anatella graph creates a MQTT-based webservice that “echoes” the received data:

 

AN76E5~1_img303

 

There are some limitations on the set of Actions that can be used inside an Anatella graph using a AN76E5~1_img296 MQTSubscribe Action as the data source: See the section 10.8.4. for more details.