{"action":"created","issue":{"url":"https://api.github.com/repos/jakubkulhan/bunny/issues/61","repository_url":"https://api.github.com/repos/jakubkulhan/bunny","labels_url":"https://api.github.com/repos/jakubkulhan/bunny/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/jakubkulhan/bunny/issues/61/comments","events_url":"https://api.github.com/repos/jakubkulhan/bunny/issues/61/events","html_url":"https://github.com/jakubkulhan/bunny/pull/61","id":303371792,"number":61,"title":"Heartbeat","user":{"login":"sm2017","id":19644997,"avatar_url":"https://avatars0.githubusercontent.com/u/19644997?v=4","gravatar_id":"","url":"https://api.github.com/users/sm2017","html_url":"https://github.com/sm2017","followers_url":"https://api.github.com/users/sm2017/followers","following_url":"https://api.github.com/users/sm2017/following{/other_user}","gists_url":"https://api.github.com/users/sm2017/gists{/gist_id}","starred_url":"https://api.github.com/users/sm2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sm2017/subscriptions","organizations_url":"https://api.github.com/users/sm2017/orgs","repos_url":"https://api.github.com/users/sm2017/repos","events_url":"https://api.github.com/users/sm2017/events{/privacy}","received_events_url":"https://api.github.com/users/sm2017/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-08T06:34:42Z","updated_at":"2018-03-09T09:04:19Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/jakubkulhan/bunny/pulls/61","html_url":"https://github.com/jakubkulhan/bunny/pull/61","diff_url":"https://github.com/jakubkulhan/bunny/pull/61.diff","patch_url":"https://github.com/jakubkulhan/bunny/pull/61.patch"},"body":"According to https://www.rabbitmq.com/heartbeats.html\r\n>Heartbeat frames are sent about every timeout / 2 seconds. After two missed heartbeats, the peer is considered to be unreachable\r\n\r\nSo https://github.com/jakubkulhan/bunny/blob/master/src/Bunny/Async/Client.php#L220 is wrong"},"comment":{"url":"https://api.github.com/repos/jakubkulhan/bunny/issues/comments/371754408","html_url":"https://github.com/jakubkulhan/bunny/pull/61#issuecomment-371754408","issue_url":"https://api.github.com/repos/jakubkulhan/bunny/issues/61","id":371754408,"user":{"login":"jakubkulhan","id":95001,"avatar_url":"https://avatars1.githubusercontent.com/u/95001?v=4","gravatar_id":"","url":"https://api.github.com/users/jakubkulhan","html_url":"https://github.com/jakubkulhan","followers_url":"https://api.github.com/users/jakubkulhan/followers","following_url":"https://api.github.com/users/jakubkulhan/following{/other_user}","gists_url":"https://api.github.com/users/jakubkulhan/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubkulhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubkulhan/subscriptions","organizations_url":"https://api.github.com/users/jakubkulhan/orgs","repos_url":"https://api.github.com/users/jakubkulhan/repos","events_url":"https://api.github.com/users/jakubkulhan/events{/privacy}","received_events_url":"https://api.github.com/users/jakubkulhan/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T09:04:19Z","updated_at":"2018-03-09T09:04:19Z","author_association":"OWNER","body":"[The spec](https://www.rabbitmq.com/resources/specs/amqp0-9-1.pdf) states in 4.2.7:\r\n\r\n> The peer should make a best effort to send heartbeats at specified intervals. **Heartbeats can be sent at any time.** Any sent octet is a valid substitute for a heartbeat, thus heartbeats only have to be sent if no non-heartbeat AMQP traffic is sent for longer than one heartbeat interval. If a peer detects no incoming traffic (i.e. received octets) **for two heartbeat intervals or longer**, it should close the connection without following the Connection.Close/Close-Ok handshaking, and log an error\r\n\r\n(I've added emphasis)\r\n\r\nSeems RabbitMQ (either implementation, or docs) mixes up heartbeat frames & heartbeat interval. Can you confirm the behavior described in RabbitMQ docs / AMQP spec? What version of RabbitMQ are you running?"}}
{"actor":{"display_login":"jakubkulhan"}}