Receiver¶
Namespace: MQTT_Receiver_Worker.MQTT
Handles MQTT topic subscription and message receiving functionality.
This class is responsible for subscribing to configured topics from the settings repository
and managing the connection to the MQTT broker.
Inheritance Object → Receiver
Implements IReceiver
Constructors¶
Receiver(IServiceProvider, IConnection, ILogger<Receiver>)¶
Initializes a new instance of the Receiver class.
Parameters¶
serviceProvider
IServiceProvider
Service provider for dependency injection.
connection
IConnection
Connection manager for the MQTT client.
logger
ILogger<Receiver>
Logger for diagnostic information.
Methods¶
SubscribeToTopics()¶
Subscribes to configured MQTT topics using shared subscriptions.
Retrieves topic settings from the repository and establishes subscriptions
Returns¶
A task that represents the asynchronous subscribe operation.