完成Mqtt服务器添加功能

This commit is contained in:
2025-09-06 12:03:39 +08:00
parent 08f9de137e
commit 52f76e2377
18 changed files with 417 additions and 271 deletions

View File

@@ -266,7 +266,7 @@ public class MqttBackgroundService : BackgroundService
var options = new MqttClientOptionsBuilder()
.WithClientId(mqtt.ClientId)
.WithTcpServer(mqtt.BrokerAddress, mqtt.Port)
.WithTcpServer(mqtt.ServerUrl, mqtt.Port)
.WithCredentials(mqtt.Username, mqtt.Password)
.WithCleanSession()
.Build();