Configuration
MQTT Dev has two configurable pieces:
- Broker connections — configured in the Gateway web UI.
- Subscriptions — authored in the Designer (see also Usage).
Broker Connections
Broker connections are persisted as the config resource com.operametrix.ignition.mqtt:broker (category MQTT Brokers) and managed at Connections → MQTT Dev → Brokers.
Broker Settings
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| name | String | Yes | — | Unique connection name. Must start with a letter, then letters / digits / - / _. Immutable after creation. |
| serverUri | String | Yes | tcp://localhost:1883 | Broker URI. Must start with tcp://, ssl://, ws://, or wss://. |
| clientId | String | No | (blank) | MQTT client id. Blank auto-generates one. |
| username | String | No | (blank) | Username for authentication. Blank means anonymous. |
| password | String | No | (blank) | Password for authentication. See the security note below. |
| keepAlive | int (seconds) | No | 60 | Keep-alive interval. Must be greater than 0. |
| cleanSession | boolean | No | true | Whether to start a clean MQTT session. |
| enabled | boolean | No | true | Only enabled brokers connect. |
The broker password is stored in the configuration resource as plaintext (it is annotated @NonSecret and is not routed through Ignition's secret management system). Treat Gateway configuration backups and the broker config resource as sensitive, and restrict access accordingly. Prefer broker-side controls (e.g. dedicated MQTT credentials with least privilege) where possible.
Fixed Connect Options
The following connection options are fixed and not user-configurable:
| Option | Value |
|---|---|
| Connection timeout | 10 seconds |
| Automatic reconnect | Enabled (with subscription replay) |
| Persistence | In-memory (MemoryPersistence) |
ssl:// and wss:// have no dedicated TLS configuration fields — see Installation → Network Requirements.
Creating a Broker Connection
Use the Create Broker Connection wizard, which walks through three steps:
- Connection — name and server URI
- Authentication — client id, username, password
- Options — keep-alive, clean session, enabled
After creation, each row provides an edit drawer and row actions: Edit, Enable / Disable, and Delete. A live Status badge is shown per broker (polled roughly every 5 seconds).
Subscriptions
Subscriptions are project resources (com.operametrix.ignition.mqtt:subscriptions, type mqtt-subscription). They are authored in the Designer's MQTT Dev section and are stored Web Dev-style as a config.json plus an onMessage.py file.
Subscription Fields
| Field | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | false | Whether the subscription is active. |
| broker | String | — | Name of a configured broker (chosen from a dropdown). |
| topic-filter | String | — | MQTT topic filter. Wildcards + and # are allowed. |
| qos | int (0/1/2) | 0 | Requested Quality of Service. |
| onMessage.py | Jython | — | Handler invoked for matching messages. |
A subscription registers with the broker only when it is enabled and its broker, topic-filter, and handler code are all non-blank.
The handler signature and runtime behavior are documented in Usage → Subscriptions.
Status Tags
The module publishes live status tags under [System]:
[System] MQTT Dev/Brokers/<name>/Enabled (Boolean)
[System] MQTT Dev/Brokers/<name>/Status (String: Connected / Disconnected / Disabled)
These are polled every 2 seconds and can be used in tags, bindings, and scripting like any other system tag.
REST and OpenAPI
- Status endpoint —
GET /data/mqttdev/brokers/statusreturns broker status. - Broker CRUD — Auto-generated OpenAPI CRUD is exposed for the broker configuration (OpenAPI group MQTT Dev, tag brokers).