{"action":"opened","issue":{"url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/452","repository_url":"https://api.github.com/repos/eclipse/paho.mqtt.c","labels_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/452/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/452/comments","events_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/452/events","html_url":"https://github.com/eclipse/paho.mqtt.c/issues/452","id":323227704,"number":452,"title":"100ms fixed timeout when QoS=2 (bad performances)","user":{"login":"LorenzoBe","id":39305504,"avatar_url":"https://avatars1.githubusercontent.com/u/39305504?v=4","gravatar_id":"","url":"https://api.github.com/users/LorenzoBe","html_url":"https://github.com/LorenzoBe","followers_url":"https://api.github.com/users/LorenzoBe/followers","following_url":"https://api.github.com/users/LorenzoBe/following{/other_user}","gists_url":"https://api.github.com/users/LorenzoBe/gists{/gist_id}","starred_url":"https://api.github.com/users/LorenzoBe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LorenzoBe/subscriptions","organizations_url":"https://api.github.com/users/LorenzoBe/orgs","repos_url":"https://api.github.com/users/LorenzoBe/repos","events_url":"https://api.github.com/users/LorenzoBe/events{/privacy}","received_events_url":"https://api.github.com/users/LorenzoBe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-15T13:52:00Z","updated_at":"2018-05-15T13:52:00Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nin my project I need to publish messages with high frequency. The publish result must be synchronous, to retry the publish later in case of issues.\r\nFor this reason I am using the parameters QoS=2 and Reliable=true (message queue size equal to 1).\r\n\r\nWith this configuration Paho sends messages with a frequency of 10 messages/second (see attached wiresharkSnapshot.png). The issue seems to be related to the \"timeout\" const in MQTTClient_yield(), called by MQTTClient_publish function.\r\nI tried to reduce the value to 10ms and the delay disappear, apparently without introducing drawbacks.\r\n\r\nDo you have any suggestion about how to avoid the issue and if we can set the value to 10ms without side effects?\r\n\r\nFor reproducibility, I attached the code snippet which cause the issue.\r\n\r\nThanks,\r\nLorenzo\r\n![wiresharksanpshot](https://user-images.githubusercontent.com/39305504/40060827-c58de776-5857-11e8-9eb9-d10c9bbdf9d0.png)\r\n[paho_producer.c.txt](https://github.com/eclipse/paho.mqtt.c/files/2005240/paho_producer.c.txt)\r\n\r\n"}}
{"actor":{"display_login":"LorenzoBe"}}