{"action":"created","issue":{"url":"https://api.github.com/repos/eandersson/amqpstorm/issues/33","repository_url":"https://api.github.com/repos/eandersson/amqpstorm","labels_url":"https://api.github.com/repos/eandersson/amqpstorm/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/eandersson/amqpstorm/issues/33/comments","events_url":"https://api.github.com/repos/eandersson/amqpstorm/issues/33/events","html_url":"https://github.com/eandersson/amqpstorm/issues/33","id":190479687,"number":33,"title":"Out of order ack-ing?","user":{"login":"fake-name","id":1401239,"avatar_url":"https://avatars.githubusercontent.com/u/1401239?v=3","gravatar_id":"","url":"https://api.github.com/users/fake-name","html_url":"https://github.com/fake-name","followers_url":"https://api.github.com/users/fake-name/followers","following_url":"https://api.github.com/users/fake-name/following{/other_user}","gists_url":"https://api.github.com/users/fake-name/gists{/gist_id}","starred_url":"https://api.github.com/users/fake-name/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fake-name/subscriptions","organizations_url":"https://api.github.com/users/fake-name/orgs","repos_url":"https://api.github.com/users/fake-name/repos","events_url":"https://api.github.com/users/fake-name/events{/privacy}","received_events_url":"https://api.github.com/users/fake-name/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/eandersson/amqpstorm/milestones/9","html_url":"https://github.com/eandersson/amqpstorm/milestones/2.2.1","labels_url":"https://api.github.com/repos/eandersson/amqpstorm/milestones/9/labels","id":2145655,"number":9,"title":"2.2.1","description":null,"creator":{"login":"eandersson","id":3922797,"avatar_url":"https://avatars.githubusercontent.com/u/3922797?v=3","gravatar_id":"","url":"https://api.github.com/users/eandersson","html_url":"https://github.com/eandersson","followers_url":"https://api.github.com/users/eandersson/followers","following_url":"https://api.github.com/users/eandersson/following{/other_user}","gists_url":"https://api.github.com/users/eandersson/gists{/gist_id}","starred_url":"https://api.github.com/users/eandersson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eandersson/subscriptions","organizations_url":"https://api.github.com/users/eandersson/orgs","repos_url":"https://api.github.com/users/eandersson/repos","events_url":"https://api.github.com/users/eandersson/events{/privacy}","received_events_url":"https://api.github.com/users/eandersson/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-11-19T06:38:19Z","updated_at":"2016-11-19T06:38:19Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2016-11-19T06:16:42Z","updated_at":"2016-11-19T07:02:41Z","closed_at":null,"body":"Whoooo, more wierdness!\r\n\r\n```\r\n.Thread-21 - INFO - Message channel: <amqpstorm.channel.Channel object at 0x7f5d08cdbcc8>\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Message properties: {'headers': None, 'reply_to': '', 'user_id': '', 'cluster_id': '', 'app_id': '', 'delivery_mode': None, 'content_type': '', 'correlation_id': 'keepalive', 'expiration': '', 'message_id': '', 'message_type': '', 'priority': None, 'content_encoding': 'utf-8', 'timestamp': None}\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Message _channel: <amqpstorm.channel.Channel object at 0x7f5d08cdbcc8>\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Message _method: {'routing_key': b'nak', 'redelivered': False, 'delivery_tag': 5, 'exchange': b'keepalive_exchange140037604406920', 'consumer_tag': b'amq.ctag-DCdsyFR66UJsU7sgkNp9oQ'}\r\nACK For delivery tag: 5\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Heartbeat packet received! wat\r\nMain.Connector.Internal(/rpcsys).Thread-23 - INFO - Timeout watcher loop. Current message counts: 0 (out: 0, in: 0)\r\nMain.Connector.Container(/rpcsys).Thread-23 - INFO - Interface timeout thread. Ages: heartbeat -> 4.83, last message -> 32.51.\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Received message!\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Message channel: <amqpstorm.channel.Channel object at 0x7f5d08cdbcc8>\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Message properties: {'headers': None, 'reply_to': '', 'user_id': '', 'cluster_id': '', 'app_id': '', 'delivery_mode': None, 'content_type': '', 'correlation_id': 'keepalive', 'expiration': '', 'message_id': '', 'message_type': '', 'priority': None, 'content_encoding': 'utf-8', 'timestamp': None}\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Message _channel: <amqpstorm.channel.Channel object at 0x7f5d08cdbcc8>\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Message _method: {'routing_key': b'nak', 'redelivered': False, 'delivery_tag': 6, 'exchange': b'keepalive_exchange140037604406920', 'consumer_tag': b'amq.ctag-DCdsyFR66UJsU7sgkNp9oQ'}\r\nACK For delivery tag: 6\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Heartbeat packet received! wat\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Received message!\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Message channel: <amqpstorm.channel.Channel object at 0x7f5d08cdbcc8>\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Message properties: {'headers': None, 'reply_to': '', 'user_id': '', 'cluster_id': '', 'app_id': '', 'delivery_mode': None, 'content_type': '', 'correlation_id': 'keepalive', 'expiration': '', 'message_id': '', 'message_type': '', 'priority': None, 'content_encoding': 'utf-8', 'timestamp': None}\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Message _channel: <amqpstorm.channel.Channel object at 0x7f5d08cdbcc8>\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Message _method: {'routing_key': b'nak', 'redelivered': True, 'delivery_tag': 7, 'exchange': b'keepalive_exchange140037604406920', 'consumer_tag': b'amq.ctag-DCdsyFR66UJsU7sgkNp9oQ'}\r\nACK For delivery tag: 7\r\nMain.Connector.Container(/rpcsys).Thread-21 - INFO - Heartbeat packet received! wat\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR - Error while in rx runloop!\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -       Channel 1 was closed by remote server: PRECONDITION_FAILED - unknown delivery tag 6\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR - Traceback (most recent call last):\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -   File \"/media/Storage/Scripts/ReadableWebProxy/FetchAgent/AmqpConnector/__init__.py\", line 546, in _rx_poll\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -     self.interface.process_rx_events()\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -   File \"/media/Storage/Scripts/ReadableWebProxy/FetchAgent/AmqpConnector/__init__.py\", line 171, in process_rx_events\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -     self.storm_channel.process_data_events(to_tuple=False)\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -   File \"/media/Storage/Scripts/ReadableWebProxy/amqpstorm/channel.py\", line 266, in process_data_events\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -     for message in self.build_inbound_messages(break_on_empty=True):\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -   File \"/media/Storage/Scripts/ReadableWebProxy/amqpstorm/channel.py\", line 113, in build_inbound_messages\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -     self.check_for_errors()\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -   File \"/media/Storage/Scripts/ReadableWebProxy/amqpstorm/channel.py\", line 188, in check_for_errors\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -     raise exception\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR - amqpstorm.exception.AMQPChannelError: Channel 1 was closed by remote server: PRECONDITION_FAILED - unknown delivery tag 6\r\nMain.Connector.Internal(/rpcsys).Thread-21 - ERROR -\r\nMain.Connector.Internal(/rpcsys).Thread-21 - WARNING - Should die flag! Runstate: running, threads live: threads alive, had exception: yes.\r\nMain.Connector.Internal(/rpcsys).Thread-21 - INFO - RX Poll process dying. Threads_live: 1, had exception 1, should_die True\r\nMain.Connector.Internal(/rpcsys).Thread-22 - WARNING - Should die flag! Runstate: running, threads live: threads alive, had exception: yes.\r\nMain.Connector.Internal(/rpcsys).Thread-22 - WARNING - Should die flag! Runstate: running, threads live: threads alive, had exception: yes.\r\nMain.Connector.Internal(/rpcsys).Thread-22 - INFO - TX Poll process dying (should die: True). Threads_live: 1, runstate: 1, resp queue size: 0, had exception 1.\r\nMain.Connector.Internal(/rpcsys).Thread-23 - WARNING - Should die flag! Runstate: running, threads live: threads alive, had exception: yes.\r\nDisconnecting!\r\nMain.Connector.Container(/rpcsys).Thread-2 - INFO - Closing channel\r\nMain.Connector.Container(/rpcsys).Thread-2 - INFO - Closing connection\r\nRunning state: True, thread alive: True, thread id:140037440014080\r\nJoining _inbound_thread. Runstate: %s False\r\n\r\n```\r\n\r\nContext:\r\n\r\nI have a connection with a thread processing the receiving messages. I have instrumented `Message.ack()` with a print statement that prints the delivery tag that it's acking.\r\n\r\nIt appears I'm calling [delivery tag 6].ack(), [delivery tag 7].ack(), and somehow the ack for delivery tag 7 is getting received by the rabbitmq server /first/, resulting in a `PRECONDITION_FAILED` error because acking 7 implicitly acks previous tags, and therefore 6 is not a valid delivery tag anymore.\r\n\r\nI'm working on pulling out a testable example, but it's certainly odd.\r\n\r\n------\r\n\r\nIncidentally, the new docs pages are fancypants!"},"comment":{"url":"https://api.github.com/repos/eandersson/amqpstorm/issues/comments/261698106","html_url":"https://github.com/eandersson/amqpstorm/issues/33#issuecomment-261698106","issue_url":"https://api.github.com/repos/eandersson/amqpstorm/issues/33","id":261698106,"user":{"login":"fake-name","id":1401239,"avatar_url":"https://avatars.githubusercontent.com/u/1401239?v=3","gravatar_id":"","url":"https://api.github.com/users/fake-name","html_url":"https://github.com/fake-name","followers_url":"https://api.github.com/users/fake-name/followers","following_url":"https://api.github.com/users/fake-name/following{/other_user}","gists_url":"https://api.github.com/users/fake-name/gists{/gist_id}","starred_url":"https://api.github.com/users/fake-name/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fake-name/subscriptions","organizations_url":"https://api.github.com/users/fake-name/orgs","repos_url":"https://api.github.com/users/fake-name/repos","events_url":"https://api.github.com/users/fake-name/events{/privacy}","received_events_url":"https://api.github.com/users/fake-name/received_events","type":"User","site_admin":false},"created_at":"2016-11-19T07:02:41Z","updated_at":"2016-11-19T07:02:41Z","body":"will do\r\n"}}
{"actor":{"display_login":"fake-name"}}