dotnet / dotnet/MQTTnet

sendmessage and mqtt service return function_clause

Open
#2,061 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
5.1k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.