Azure / azure-umqtt-c

General purpose library for communication over the mqtt protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ping response timeout quesiton

xiongyu0523 opened this issue · comments

commented

my project is encountering a problem that azure-iot-c-sdk return NO_PING_REPSONE error to user application but it can immediately reconnect very quickly. I'm trying to understand the design of ping response.

  • By default we set it to 80s, and use the min(80, keepalive/2) in our code, why does the comment says 80% of send time?
  • MQTT spec left this to implementation of mqtt client, how did we decide to use this value?
  • do you see any customer in a poor network condition suffer this error but by adjust it to a higher value solve the problem?
  • do you think it will useful to make it configurable?

See MQTT Ping Response timeout section in https://docs.aws.amazon.com/embedded-csdk/latest/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/mqtt_timeouts.html#mqtt_timeouts_ping_response

By using Wireshark to capture the device package, we found once device send the heart-beat package to IoT Hub, and did not receive the ack for 80s, NO-PING-RSPONSE will return. And a immediate re-connect will perform. Is it a normal processure?

Sorry for the long delay in responding. Please file this issue if needed in the correct repo, azure/azure-iot-sdk-c.

Short answers:

MQTT spec left this to implementation of mqtt client, how did we decide to use this value?

The code has changed in this area and we are not sure what you are referring to. If you file a new issue on azure-iot-sdk-c please provide a link to the referred comment.

do you see any customer in a poor network condition suffer this error but by adjust it to a higher value solve the problem?

Yes.

do you think it will useful to make it configurable?

At this point we are not considering making any other configurations publicly settable.