Skip to main content
Share:
Link is copied

MQTT Protocol

TNA devices and evalink talos enable data exchange with third-party devices through MQTT (Message Queuing Telemetry Transport) integration.

MQTT is a client-server based open protocol for M2M (machine to machine) communication that operates reliably even in unstable or slow network conditions.

A typical MQTT configuration, featuring one broker (server) and n clients, involves two operations:

Publish: which enables a client to send data to the broker.

Subscribe: which enables the client to receive notifications regarding changes in a certain topic.

MQTT Principal

A client needs to connect to the broker prior to both operations. The client receives an acknowledgement after successfully connecting to the broker.

The messages are transparently transmitted and received to and from evalink talos. By using MQTT's so called topics, many operations can be accomplished without having a large overhead on both the TNA and most other devices.

MQTT Data Flow

KeepAlive

MQTT supports a ping functionality to periodically check the presence of a broker and a client.

When establishing a connection with the broker, the client informs about a time interval in seconds for communications. The broker is then informed about the maximum permissible duration without communication with the client. When this limit is reached, the client is considered disconnected.

Last Will and Testament

This feature can be used to notify other clients about an ungracefully disconnected client. This may happen when the connection to the broker is disturbed or when the client is unexpectedly shut down.

Each client is able to provide such a message and the corresponding topic when it builds up the connection. Once the broker detects that a client got disconnected, it automatically publishes the message to that topic.

This can be used to inform evalink talos about issues on 3rd party devices.

QoS

QoS is a feature that ensures reliable message transmission. There are three modes:

QoS 0 (at most once) is the minimal approach and offers no security. It is often called fire and forget as the broker doesn't acknowledge messages.

QoS 1 (at least once) guarantees that each message is delivered to the broker at least once. While the client stores its message until the broker acknowledges it, it may happen that the message is retransmitted.

QoS 2 (exactly once) while it offers the highest security, it is the slowest approach, involving multiple requests and responses to and from the broker.

QoS 1 should be used to ensure reliable communication.

Was this page helpful?