Skip to main content
Version: 5.5

MQTT Plug-in

The following properties can be set in the configuration of the MQTT plug-in.

Legacy / Migration

Up to version 5.4, the MQTT implementation could be selected in the Expert setting → Implementation area. The following options were available:

  • Legacy Automatic
  • Legacy Strider Mqtt
  • Legacy MQTTnet
  • MQTTnet (recommended) Starting with version 5.5, a migration note appears for old configurations, recommending switching to MQTT .NET V2. Starting with version 5.6, only MQTT .NET V2 is available.

Tab: Router Settings

FieldDescription
NameAssign a unique name to the MQTT connection.
Cloud ProfileSelect the desired profile: MQTT Standard, AWS, Azure IoT, Wago Cloud.
Test Connection can be used to check the current connection.

Cloud profiles

The cloud profiles extend the standard configuration with additional tabs:

tip

**For more information on using MQTT and the cloud profiles, please refer to our Knowledge Base: ** https://www.opc-router.de/knowledge-base/


Tab: Connection settings

Connection details

FieldDescription
Broker connectionEnter the address of the MQTT broker.
PortTCP port of the broker (default: 8883).
MQTT versionSelect the protocol version (e.g., MQTT v5 or MQTT v3.1.1).
Quality of Service typeSelect the default QoS: 0 – maximum once, 1 – minimum once, or 2 – exactly once.
Performance

For details on latency times, network round trips (RTT), and internal synchronization during publish operations, see [MQTT Performance] (mqtt_performance.md).

Authentication

FieldDescription
UsernameUsername for logging in to the broker.
PasswordSelection of a secret. The buttons can be used to create, edit, or delete a secret.
Client IDUnique client ID. Supports placeholders:${hostname}, #[INSTANCE], # [INSTANCE:<numeric value>], #[RAND:<numeric value>]. This is helpful for connection pooling or project synchronization to automatically generate different IDs per instance. Example: MyInstance-${hostname}-#[RAND:4]
*Buttons *Random – generates a random ID. Client ID Template – inserts the default template into the input field.

Enable TLS/SSL

FieldDescription
SSL protocolSelect from supported protocols (e.g., TLSv1.2, TLSv1.3).
Client certificateSelect a client certificate (or Without).
Trusted certificatesSpecifies which certificates are accepted (e.g., All (unsafe), Windows, Router).

Tab: Storage

FieldDescription
Enable MQTT Data StorageWhen enabled, the last received MQTT message for each topic is stored on the hard disk. This feature is required to use the MQTT Storage Read Transfer Object.
PatternA subscription is created for each topic pattern added. Supports wildcards + and #.
NoteFree text to describe the purpose or origin of a topic.
How it works

When the MQTT Data Storage function is enabled, the OPC Router creates automatic subscriptions for all entered topics. The received messages are stored persistently – only the last message per topic (old values are overwritten). These stored values can be read out again using the MQTT Storage Read transfer object.


Tab: First Will

FieldDescription
Enable First WillEnables the sending of a First Will when establishing a connection.
Retain First WillBroker stores message for later delivery.
TopicTarget topic for the First Will.
PayloadContent of the First Will message.
Quality of ServiceService quality (0, 1, or 2).

Tab: Last Will

FieldDescription
Enable Last WillActivates the sending of a message when the connection is terminated.
Retain Last WillBroker stores message for later delivery.
Send Last Will on disconnectSends Last Will even when disconnecting manually.
TopicTarget topic for Last Will.
PayloadContent of Last Will message.
Quality of ServiceService quality (0, 1, or 2).

Tab: Advanced

Connection Pool

FieldDescription
Enable Connection PoolingWhen enabled, one connection is used for subscriptions and multiple connections are used for publish operations. Useful for high message volumes.
Min. connectionsMinimum number of connections.
Max. connectionsMaximum number of connections.
Connection idle timeoutTime in minutes after which inactive connections are closed.

Subscription/Trigger

FieldDescription
Wait for transferRouter only responds to the broker after the transfer has been completed or failed.
Enable message deduplicationPrevents multiple triggers for identical messages within a time window.
Deduplication time windowTime in seconds during which identical messages are ignored.

Session options

FieldDescription
CleanSessionStarts a new session without stored messages (disable for persistent sessions).
Keep alive (s)Ping interval in seconds.
Timeout (ms)Waiting time in milliseconds for reconnection.