Product Documentation

FairCom DB V12 Updates

Previous Topic

Next Topic

MQTT

MQTT, or Message Queuing Telemetry Transport, is a lightweight protocol allowing small pieces of data to be transferred from machine to machine across networks. MQTT works well even on low bandwidth, high latency connections, which makes it ideal for the Internet of Things (IoT).

The FairCom MQTT Plug-in provides an MQTT Broker with the ability to persist MQTT messages in relational tables for easy integration with other systems.

MQTT communication consists of a publisher, a broker, and a subscriber:

  • A subscriber connects to a broker and registers for a particular topic (a UTF-8 string used by the broker to filter messages for each connected client).
  • A publisher connects to a broker and sends a message tagged with a particular topic.
  • The broker receives the message and sends it to any subscribers who have subscribed to that topic.

With the MQTT Plug-in, the Broker is a generic broker for connecting c-tree as a persistent data store under an MQTT application. It can be placed on smaller devices and gateways typically found near sensors. It persists MQTT message contents on the edge. By locating c-tree on the edge, MQTT message contents can be persisted near the sensors where service is unaffected by the latency of the cloud.

Any JSON field contained in a specified topic is automatically persisted to a specified database table. This table is simultaneously available via a FairCom DB SQL server allowing ISAM and SQL connections to the persisted fields for immediately accessible data.

Data continues to flow through the Broker normally, going from publisher to subscriber while, at the same time, being stored in a database. Configure as many tables as you want each one collecting fields from different topics. This allows full SQL access to some or all fields of data moving through the MQTT Broker with very little change to standard MQTT setups.

Persistence Auto-Restart - When a MQTT Persistence is enabled, a file is placed in the mqtt/active directory with the topic name and persistence information. If the server is restarted with the persistence active, it loads this file during the initialization and restarts the persistence automatically. When Persistence is turned OFF, this file is deleted.

In This Section

MQTT Using Auto Timestamp

MQTT - Option for Replication Enable/Disable

TOCIndex