MQTTnet
MQTTnet copied to clipboard
sendmessage and mqtt service return function_clause
mqtt server version:4.3.1 and this is my code: public static void QueueStart() { Task.Factory.StartNew(async () => { while (true) { try { if (queue.TryDequeue(out var data)) { if (data != null) { await MqttSubHelper.PublishAsync(data.Topic , data.Message); await Task.Delay(500); } } } catch (System.Exception e) { LogHelper.Error(e , "MqttQueneHelper_QueueStart"); } finally { await Task.Delay(50); } } }); } when send then message ,The server has a chance to reply function_clause.I donnot know how i and do .and the same server ,java has no problem