Skip to main content
Version: 5.5

MQTT Plug-in

You can configure the following properties in the MQTT plug-in settings.

Legacy / Migration

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

  • Legacy Automatic
  • Legacy Strider MQTT
  • Legacy MQTT.NET
  • MQTT.NET (recommended)

Starting with version 5.5, a migration notice appears for old configurations, recommending a switch 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.

You can check the current connection by clicking Test Connection.

Cloud Profiles

The cloud profiles extend the standard configuration with additional tabs:

tip

For more information on using MQTT and the cloud profiles, see 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 – at most once, 1 – at least once, or 2 – exactly once.
Performance

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

Authentication

FieldDescription
UsernameUsername for logging in to the broker.
PasswordSelection of a secret. Use the buttons to create, edit, or delete a secret.
Client IDUnique client ID. Supports placeholders: ${hostname} to get the system name, ${hostname:lower} to get the system name in lowercase, #[INSTANCE], #[INSTANCE:<numerischer wert="">], #[RAND:<numerischer wert="">]. This is helpful for connection pooling or project synchronization to automatically generate different IDs per instance. Example: MyInstance-${hostname}-#[RAND:4]
ButtonsRandom – generates a random ID. Client ID Template – inserts the default template into the input field.

Enable TLS/SSL

FieldDescription
SSL protocolSelection of supported protocols (e.g., TLSv1.2, TLSv1.3).
Client certificateSelection of a client certificate (or Without).
Trusted certificatesSpecify 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 saved to disk. This feature is required to use the MQTT Storage Read Transfer Object.
PatternA subscription is created for each added topic pattern. Supports wildcards + and #.
NoteFree text describing 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 registered topics. The received messages are stored persistently – only the most recent message per topic (older values are overwritten). These stored values can be retrieved specifically using the MQTT Storage Read Transfer Object.


Tab: First Will

FieldDescription
Enable First WillEnables the sending of a First Will upon connection establishment.
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 WillEnables sending a message upon connection termination.
Retain Last WillBroker saves message for later delivery.
Send Last Will on disconnectSends Last Will even upon manual disconnection.
TopicTarget topic for the Last Will.
PayloadContent of the Last Will message.
Quality of ServiceService quality (0, 1, or 2).

Tab: Advanced

Connection Pool

FieldDescription
Enable Connection PoolingWhen enabled, a single connection is used for subscriptions and multiple connections 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 transferThe router responds to the broker only after the transfer has 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 saved messages (disable for persistent sessions).
Keep alive (s)Ping interval in seconds.
Timeout (ms)Wait time in milliseconds for reconnection.