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>, IConfiguration)¶
Initializes a new instance of the Receiver class.
public Receiver(IServiceProvider serviceProvider, IConnection connection, ILogger<Receiver> logger, IConfiguration configuration)
Parameters¶
serviceProvider IServiceProvider
Service provider for dependency injection.
connection IConnection
Connection manager for the MQTT client.
logger ILogger<Receiver>
Logger for diagnostic information.
configuration IConfiguration
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.