full publish vs single [message #1849233] |
Sun, 09 January 2022 21:36 |
Clay Jackson Messages: 1 Registered: January 2022 |
Junior Member |
|
|
I'm working code developed by a 3rd party that's using MQTT to move message from one weather application to another. It's a "full observation" (maybe 30 different data points), NOT individual name/value pairs.
The current code invoked the publish method, but did NOT implement ANY callbacks, and did NOT include QoS in the call to publish. It's sending 3 topics, at a rate of maybe 1 or 2 messages/minute.
After between 24 and 72 hours, messages just stopped appearing at the broker (mosquitto_sub stopped printing messages). Restarting the program "cleared" the issue. About 36 hours ago, I changed the code to invoke the "single message" and it seems to be working fine.
For a "Paho Newbie" this begs some questions:
1) As long as I don't care if I "miss a message" (or two), are there any other drawabacks to "single"?
2) Is there a breakpoint where the single connect/send disconnect (as opposed to a persistent connection?
3) Is there a timeout on connections - if it was to drop to one message every 5 minutes, would I need to worry about keepalive on either publisher or subscriber.?
Thanks in advance!
|
|
|
Powered by
FUDForum. Page generated in 0.03412 seconds