Closed fazho closed 2 months ago
I am using MqttClient class (https://github.com/dotnet/MQTTnet/blob/2fdbb02dc8922937e751a75a1f2f3163dcf45300/Source/MQTTnet/MqttClient.cs#L21) to publish MQTT messages. The method I am calling is PublishAsync(). Right now my code can access the same MqttClient object from multiple threads. Is MqttClient or PublishAsync() thread safe?
@chkr1011 for visibility. Thanks!
QoS Level: at least once
The client is not thread safe.
Deep-dive thread: https://github.com/dotnet/MQTTnet/issues/2078
Describe your question
I am using MqttClient class (https://github.com/dotnet/MQTTnet/blob/2fdbb02dc8922937e751a75a1f2f3163dcf45300/Source/MQTTnet/MqttClient.cs#L21) to publish MQTT messages. The method I am calling is PublishAsync(). Right now my code can access the same MqttClient object from multiple threads. Is MqttClient or PublishAsync() thread safe?
Which project is your question related to?