API reference — channels & topics
This section provides a detailed breakdown of the structural objects used to define your application’s communication topology. These classes encapsulate the lower-level topic strings and provide functional, directional logic to the communication layer.
SyMqttSenderTopicHolder
Section titled “SyMqttSenderTopicHolder”Represents a logical outbound pipe used exclusively for publishing messages.
Constructors
Section titled “Constructors”SyMqttSenderTopicHolder(string id, string topic)Creates an outbound topic holder with a unique logical tracking identifier and its corresponding physical MQTT topic path.
Public properties
Section titled “Public properties”Id(string, Read-Only): The immutable logical identifier used by the application logic to reference this target.Topic(string, Read-Only): The physical MQTT topic path published to the broker.
SyMqttReceiverTopicHolder
Section titled “SyMqttReceiverTopicHolder”Represents a logical inbound pipe used for subscribing to paths and processing incoming messages via delegates.
Constructors
Section titled “Constructors”SyMqttReceiverTopicHolder(string id, string topic)Creates an inbound topic holder wrapping a subscription path.
It supports MQTT single-level+and multi-level#wildcards.
Public methods
Section titled “Public methods”public SyMqttReceiverTopicHolder AddReceivedMessageHandler(Func<string, SyMqttResponseMessageInfo, Task> handler);Appends an asynchronous delegate handler to the invocation list. This method returns the current instance (return this;), enabling fluid topology building during setup blocks.
SyMqttChannel
Section titled “SyMqttChannel”Couples exactly one outbound sender topic and one inbound receiver topic to establish a synchronous, bidirectional execution bridge.
Constructors
Section titled “Constructors”SyMqttChannel(ISyMqttBox box, string channelId, string senderTopic, string receiverTopic)The direct setup constructor. Automatically creates the underlying topic holders in the background, mapping their internal IDs based on the channel’s identity string.SyMqttChannel(ISyMqttBox box, string channelId, SyMqttSenderTopicHolder senderTopicHolder, SyMqttReceiverTopicHolder receiverTopicHolder)The explicit constructor. Injects pre-existing, independently declared topic holder objects into the channel architecture.
Public properties
Section titled “Public properties”| Property | Type | Access | Description |
|---|---|---|---|
ChannelId | string | get; | The unique logical tracking key representing this synchronous bridge. |
SenderTopicHolder | SyMqttSenderTopicHolder | get; | Reference to the assigned outbound message emitter pipe. |
ReceiverTopicHolder | SyMqttReceiverTopicHolder | get; | Reference to the assigned inbound message interceptor pipe. |