Server misses some messages from client #1500
Unanswered
marcelomecozzi
asked this question in
Q&A
Replies: 1 comment
-
Please try the very latest version of this library. I do not expect timing issues. They happened in the past but only when sending a huge number of messages. Do you use the managed client? If so, please try the regular client instead. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I will try to explain the context the best I can.
I am running the simplest server sample version, no console log and release version (I also tried debug mode and with console log)
I am running the MQTTNetApp connected to the server, fine.
I also have this mqtt client device, which is connected the the server too, and every 30 seconds, publishes a status message to a specific topic /status. Working fine too.
This device is also subscribed to another topic (/command), and as soon a message is published by anyone to this topic, the device "answers" by publishing a response mesage to another topic (/response).
Ok, I have the MQTTNetApp subscribed to the /status and /response topics. Status message are received fine every 30 seconds.
But, after publishing a message to /command topic, I do not get any message in the /response topic. Never.
I have done several tests.
If I stop the mqttservernet and start athoner mqttserver software in the same port, same ip, same pc, it works. I tried mosquitto, and several other simple mqtt servers.
Using again the mqttnet server sample, I added a "man in the middle" software, to "sniff" all tcp traffic between the server and the mqtt client device. So, the device connects to port 51883 opened by the "man in the middle" software, and it redirects traffic to port 1883 opened by the mwttserver. All of this in the same pc. So I can see messages going in and out from the mqttnet server. By doing this, response messages from the device are delivered ok! I publish a /command message from the MqttNetApp, and I get the /response message. I mean, everything works as expected!
I though it has something to do with timing, or socket parameters, so I just tried several options when starting the server like NoDelay, or LingerState. But there is no change in the tests.
Have anyone experienced anything like this? Any ideas, or further tests to perform?
Thanks in advance. Marcelo.
Beta Was this translation helpful? Give feedback.
All reactions