|
|
@ -37,7 +37,7 @@ namespace MqttSubscriberApp |
|
|
|
|
|
|
|
|
|
|
|
private static async Task MqttClient_ConnectedAsync(MqttClientConnectedEventArgs arg) |
|
|
|
private static async Task MqttClient_ConnectedAsync(MqttClientConnectedEventArgs arg) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Console.WriteLine("Connected to broker."); |
|
|
|
Console.WriteLine($"Connected to broker with ID: [{CLIENT_ID}]."); |
|
|
|
|
|
|
|
|
|
|
|
await _mqttClient.SubscribeAsync(new MqttTopicFilterBuilder() |
|
|
|
await _mqttClient.SubscribeAsync(new MqttTopicFilterBuilder() |
|
|
|
.WithTopic(TOPIC) |
|
|
|
.WithTopic(TOPIC) |
|
|
|