New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QoS>0 messages stop prematurely in Windows. #1417
Comments
You're going to need to provide more detail, but I suspect that you're client applications are not calling mosquitto_loop or similar, so you simply hit max inflight and then it blocks waiting for the rest of the qos handshakes to complete. |
Thank you for your comment. Mosquitto_loop is not used, but subscribes using mosquitto_loop_forever. Take a look at the sample source below. Is mosquitto_loop_forever not good?
|
You're missing a |
|
It's there in the pub code as well. |
Thank you for the release and correction of 1.6.7. |
Have you fixed your code to have one of |
Yes, I am using mosauitto _ loop _ forever (). As shown in the above sample program. I checked with mosquitto _ sub, but I still can't receive messages when QoS = 2. |
Sorry, I got the programs the wrong way round. I meant that your publishing code above doesn't have a loop call in it, so it will not process messages. |
Sorry, the mosquitto _ sub and mosquitto _ pub commands worked fine. |
Good to hear. So now what happens if you call |
I don't know if I'm using it correctly, but calling mosquitto _ loop () after mosquitto _ connect () and calling mosquitto _ loop () after mosquitto _ publish () produced the expected results. |
If your application does not want to do anything other than process incoming MQTT messages, then the recommendation is to use If your application does need to do anything other than process incoming messages (for example you are publishing messages on a fixed interval), then the recommendation is to use If you have other requirements, so as not wanting to use the extra thread created in In short - use |
I understand. However, calling mosquitto _ loop _ start () returned MOSQ _ ERR _ NOT _ SUPPORTED and was not available. |
Qos>0 messages in Windows are not published more than 20 messages. Specifying max_inflight_messages 0 in the broker's configuration file does not publish.
The text was updated successfully, but these errors were encountered: