Connect to MQTT using the provided configuration.
MQTT configuration
Disconnect from MQTT.
Check if the MQTT client is connected.
OptionalonceOptionalonOptional push notification when the transport connects or drops. Returns an unsubscribe function. Not required by NodeMQTTOrchestrator; adapters that omit it simply do not surface async status changes.
Invoked with { connected } on status changes
Publish a message to a topic.
MQTT topic to publish to
Message payload to publish
Subscribe to a topic with a message handler.
MQTT topic to subscribe to
Callback invoked when a message is received on the topic
Unsubscribe from a topic.
MQTT topic to unsubscribe from
Optionalhandler: (topic: string, payload: Buffer) => voidOptional handler to remove
If a handler was provided during subscription, the same function reference must be passed to successfully unsubscribe it.
Passing a different function (even if identical in implementation) will not remove the original handler.
If handler is omitted, all handlers for the topic may be removed, depending on the implementation.
MQTT Transport interface - abstraction over MQTT client. Used by NodeMQTTOrchestrator for all MQTT operations.