Closed moneyease closed 3 years ago
Please see the readme for information needed when raising an issue. Providing a log by itself does not provide enough context to track down an issue (the package has a lot of options so without knowledge of your setup its difficult to comment based purely upon a log entries) especially given that the issue may be due to something that occurred prior to the start of the included log.
My initial guess (based on no evidence as it's not covered in the logs) is that you have a MessageHandler
that is blocking (see common problems).
thanks for your quick input, please review this and I believe we are not blocking MessageHandler. Just on side notes, we see some clients never received IoT notification causing them to go out of sync, do you have any experience with such a scenario?
mqttClient.Publish(topic, 1, false, payload)
Sorry I'm going to need more than that; unless I can see the issue in the logs or have a minimal reproducible example is best its not really possible to help.
//call other RestAPI (might take a few seconds)
From "common issues" - "If you wish to perform a long-running task, or publish a message, then please use a go routine (blocking in the handler is a common cause of unexpected pingresp not received, disconnecting errors)."some clients never received IoT notification causing them to go out of sync There are all kinds of things that could cause this (subscribing at QOS 0, restarts with
SetCleanSession(true)
, broker configuration etc) so this is not really something I can answer. I don't personally use AWS IoT Core but do have a range of fairly high volume/frequency applications that run for months (in some cases years) without loosing a message (there is always a possibility of bugs in the library but I'm not currently aware of anything that would result in message loss).
Thanks Matt, my channel on the producer side was getting full (whereas the consumer working on calling RestAPI) and blocking MsgHandler
and causing pings to fail. I don't need a fix now.
Although, if we can redial when the consumer yields would be a good way to recover otherwise client loses connectivity forever.
Release: 1.3.5 We are using AWS IoT Core as broker. During our test, our client receives a few IoT notifications and publishes some stats to dynomodb and then this library gives out the following messages. I was hoping to reconnect back to the broker but looks like
c.workers.Wait()
is blocked. Is there any known issue if `pingresp fails and autoreconnect?our MsgHandler code looks like this, in particular, we see this issue when RestAPI response is large
Config