How long it take for onSubAck callback to invoke incase of there is issue with the network or incase of any other issue #661
Answered
by
bretambrose
niranjankk12
asked this question in
Q&A
Replies: 3 comments
|
0 replies
Answer selected by
jmklix
|
I tired setting protocolOperationTimeoutMs to 10000 and tried calling Subscribe() multiple times when there is no internet connection, but as the return value of function (packet Id) is increases the time out also increases, when packet Id reaches to 20, function wait for more than 5 minutes. How the packet Id is related to a time out ? |
0 replies
|
The ack timeout is only for packets that have been sent and are waiting for a response. If there's no connection, nothing will be sent, and there will be no timeout. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I am using below function to subscribe to a topic, we need to pass a callback function to get callback for server acknowledgement.
Question 1:
The function declaration doesn't clarify how long one should wait to get callback, sometime it take more than 5 minutes (if internet connection is lost), we can't wait infinitely as there are chances that it can block the thread forever,
Question 2
Do we need to wait for call back if function return 0, there are chances of crash if local function address is passed to callback if the control is return from that function. Also when subscribe called on disconnected mqtt connection object, function return non-zero value but callback never get called.
All reactions