{"action":"created","comment":{"url":"https://api.github.com/repos/nameko/nameko/pulls/comments/188292144","pull_request_review_id":120239409,"id":188292144,"diff_hunk":"@@ -0,0 +1,263 @@\n+import itertools\n+import time\n+\n+import pytest\n+from kombu.messaging import Queue\n+from mock import Mock\n+\n+from nameko.amqp.publish import Publisher\n+from nameko.constants import DEFAULT_HEARTBEAT, HEARTBEAT_CONFIG_KEY\n+from nameko.events import EventHandler, event_handler\n+from nameko.messaging import Consumer, consume\n+from nameko.rpc import ReplyListener, RpcConsumer, RpcProxy, rpc\n+from nameko.standalone.events import event_dispatcher\n+from nameko.standalone.rpc import ServiceRpcProxy\n+from nameko.testing.services import entrypoint_waiter, once\n+from nameko.testing.utils import get_extension\n+\n+\n+class TestDeadlockRegression(object):","path":"test/test_amqp.py","position":19,"original_position":19,"commit_id":"0a0abe0162924eb732c4de00be97877d095dd878","original_commit_id":"0a0abe0162924eb732c4de00be97877d095dd878","user":{"login":"mattbennett","id":107611,"avatar_url":"https://avatars3.githubusercontent.com/u/107611?v=4","gravatar_id":"","url":"https://api.github.com/users/mattbennett","html_url":"https://github.com/mattbennett","followers_url":"https://api.github.com/users/mattbennett/followers","following_url":"https://api.github.com/users/mattbennett/following{/other_user}","gists_url":"https://api.github.com/users/mattbennett/gists{/gist_id}","starred_url":"https://api.github.com/users/mattbennett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattbennett/subscriptions","organizations_url":"https://api.github.com/users/mattbennett/orgs","repos_url":"https://api.github.com/users/mattbennett/repos","events_url":"https://api.github.com/users/mattbennett/events{/privacy}","received_events_url":"https://api.github.com/users/mattbennett/received_events","type":"User","site_admin":false},"body":"Moved unchanged from test_queue_consumer.py","created_at":"2018-05-15T13:44:59Z","updated_at":"2018-05-15T13:44:59Z","html_url":"https://github.com/nameko/nameko/pull/542#discussion_r188292144","pull_request_url":"https://api.github.com/repos/nameko/nameko/pulls/542","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/nameko/nameko/pulls/comments/188292144"},"html":{"href":"https://github.com/nameko/nameko/pull/542#discussion_r188292144"},"pull_request":{"href":"https://api.github.com/repos/nameko/nameko/pulls/542"}}},"pull_request":{"url":"https://api.github.com/repos/nameko/nameko/pulls/542","id":186046080,"html_url":"https://github.com/nameko/nameko/pull/542","diff_url":"https://github.com/nameko/nameko/pull/542.diff","patch_url":"https://github.com/nameko/nameko/pull/542.patch","issue_url":"https://api.github.com/repos/nameko/nameko/issues/542","number":542,"state":"open","locked":false,"title":"Remove queue consumer","user":{"login":"mattbennett","id":107611,"avatar_url":"https://avatars3.githubusercontent.com/u/107611?v=4","gravatar_id":"","url":"https://api.github.com/users/mattbennett","html_url":"https://github.com/mattbennett","followers_url":"https://api.github.com/users/mattbennett/followers","following_url":"https://api.github.com/users/mattbennett/following{/other_user}","gists_url":"https://api.github.com/users/mattbennett/gists{/gist_id}","starred_url":"https://api.github.com/users/mattbennett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattbennett/subscriptions","organizations_url":"https://api.github.com/users/mattbennett/orgs","repos_url":"https://api.github.com/users/mattbennett/repos","events_url":"https://api.github.com/users/mattbennett/events{/privacy}","received_events_url":"https://api.github.com/users/mattbennett/received_events","type":"User","site_admin":false},"body":"On top of #536 and #537, this PR removes the `QueueConsumer` shared extension.\r\n\r\nThe changes affect the `EventHandler` and `Consumer` entrypoints and the RPC `ReplyListener` and `RpcConsumer` extensions. These now maintain their own AMQP consumers rather than delegating to the `QueueConsumer`. This removes a lot of complexity and allows more granular configuration. The refactor also allows us to detect lost RPC replies due to queue expiry and that functionality has been added.\r\n\r\nAdditional changes included here:\r\n\r\n1. Explicitly expose the `prefetch_count` via config, rather than using the `max_workers` value. \r\n\r\n2. Fixes a race condition introduced in https://github.com/nameko/nameko/commit/6f6182aff1457c22ffeed69e7aac79e4e5bf7a6f where we could raise a \"queue expired\" error when the proxy was first starting up.\r\n\r\n3. Make the tests in tests/test_events.py more reliable and easier to understand.\r\n\r\nSide-effects of this change are more connections to the RabbitMQ broker. In an ideal world, each entrypoint would maintain its own consumer but the channels and connections would be shared, but that requires more work and probably migration away from kombu. As implemented, we end up with a consumer, channel and connection for every queue from which we consume.","created_at":"2018-05-04T17:25:25Z","updated_at":"2018-05-15T13:44:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c67123bb933e73bec380a0b4640ef0e4bde033b2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"davidszotten","id":412005,"avatar_url":"https://avatars3.githubusercontent.com/u/412005?v=4","gravatar_id":"","url":"https://api.github.com/users/davidszotten","html_url":"https://github.com/davidszotten","followers_url":"https://api.github.com/users/davidszotten/followers","following_url":"https://api.github.com/users/davidszotten/following{/other_user}","gists_url":"https://api.github.com/users/davidszotten/gists{/gist_id}","starred_url":"https://api.github.com/users/davidszotten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidszotten/subscriptions","organizations_url":"https://api.github.com/users/davidszotten/orgs","repos_url":"https://api.github.com/users/davidszotten/repos","events_url":"https://api.github.com/users/davidszotten/events{/privacy}","received_events_url":"https://api.github.com/users/davidszotten/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nameko/nameko/pulls/542/commits","review_comments_url":"https://api.github.com/repos/nameko/nameko/pulls/542/comments","review_comment_url":"https://api.github.com/repos/nameko/nameko/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nameko/nameko/issues/542/comments","statuses_url":"https://api.github.com/repos/nameko/nameko/statuses/0a0abe0162924eb732c4de00be97877d095dd878","head":{"label":"mattbennett:remove-queue-consumer","ref":"remove-queue-consumer","sha":"0a0abe0162924eb732c4de00be97877d095dd878","user":{"login":"mattbennett","id":107611,"avatar_url":"https://avatars3.githubusercontent.com/u/107611?v=4","gravatar_id":"","url":"https://api.github.com/users/mattbennett","html_url":"https://github.com/mattbennett","followers_url":"https://api.github.com/users/mattbennett/followers","following_url":"https://api.github.com/users/mattbennett/following{/other_user}","gists_url":"https://api.github.com/users/mattbennett/gists{/gist_id}","starred_url":"https://api.github.com/users/mattbennett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattbennett/subscriptions","organizations_url":"https://api.github.com/users/mattbennett/orgs","repos_url":"https://api.github.com/users/mattbennett/repos","events_url":"https://api.github.com/users/mattbennett/events{/privacy}","received_events_url":"https://api.github.com/users/mattbennett/received_events","type":"User","site_admin":false},"repo":{"id":37987077,"name":"nameko","full_name":"mattbennett/nameko","owner":{"login":"mattbennett","id":107611,"avatar_url":"https://avatars3.githubusercontent.com/u/107611?v=4","gravatar_id":"","url":"https://api.github.com/users/mattbennett","html_url":"https://github.com/mattbennett","followers_url":"https://api.github.com/users/mattbennett/followers","following_url":"https://api.github.com/users/mattbennett/following{/other_user}","gists_url":"https://api.github.com/users/mattbennett/gists{/gist_id}","starred_url":"https://api.github.com/users/mattbennett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattbennett/subscriptions","organizations_url":"https://api.github.com/users/mattbennett/orgs","repos_url":"https://api.github.com/users/mattbennett/repos","events_url":"https://api.github.com/users/mattbennett/events{/privacy}","received_events_url":"https://api.github.com/users/mattbennett/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mattbennett/nameko","description":"Python framework for building microservices","fork":true,"url":"https://api.github.com/repos/mattbennett/nameko","forks_url":"https://api.github.com/repos/mattbennett/nameko/forks","keys_url":"https://api.github.com/repos/mattbennett/nameko/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattbennett/nameko/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattbennett/nameko/teams","hooks_url":"https://api.github.com/repos/mattbennett/nameko/hooks","issue_events_url":"https://api.github.com/repos/mattbennett/nameko/issues/events{/number}","events_url":"https://api.github.com/repos/mattbennett/nameko/events","assignees_url":"https://api.github.com/repos/mattbennett/nameko/assignees{/user}","branches_url":"https://api.github.com/repos/mattbennett/nameko/branches{/branch}","tags_url":"https://api.github.com/repos/mattbennett/nameko/tags","blobs_url":"https://api.github.com/repos/mattbennett/nameko/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattbennett/nameko/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattbennett/nameko/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattbennett/nameko/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattbennett/nameko/statuses/{sha}","languages_url":"https://api.github.com/repos/mattbennett/nameko/languages","stargazers_url":"https://api.github.com/repos/mattbennett/nameko/stargazers","contributors_url":"https://api.github.com/repos/mattbennett/nameko/contributors","subscribers_url":"https://api.github.com/repos/mattbennett/nameko/subscribers","subscription_url":"https://api.github.com/repos/mattbennett/nameko/subscription","commits_url":"https://api.github.com/repos/mattbennett/nameko/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattbennett/nameko/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattbennett/nameko/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattbennett/nameko/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattbennett/nameko/contents/{+path}","compare_url":"https://api.github.com/repos/mattbennett/nameko/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattbennett/nameko/merges","archive_url":"https://api.github.com/repos/mattbennett/nameko/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattbennett/nameko/downloads","issues_url":"https://api.github.com/repos/mattbennett/nameko/issues{/number}","pulls_url":"https://api.github.com/repos/mattbennett/nameko/pulls{/number}","milestones_url":"https://api.github.com/repos/mattbennett/nameko/milestones{/number}","notifications_url":"https://api.github.com/repos/mattbennett/nameko/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattbennett/nameko/labels{/name}","releases_url":"https://api.github.com/repos/mattbennett/nameko/releases{/id}","deployments_url":"https://api.github.com/repos/mattbennett/nameko/deployments","created_at":"2015-06-24T13:48:02Z","updated_at":"2018-04-26T15:14:21Z","pushed_at":"2018-05-15T11:42:10Z","git_url":"git://github.com/mattbennett/nameko.git","ssh_url":"git@github.com:mattbennett/nameko.git","clone_url":"https://github.com/mattbennett/nameko.git","svn_url":"https://github.com/mattbennett/nameko","homepage":"https://nameko.readthedocs.org","size":5836,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"nameko:master","ref":"master","sha":"22e8f7577de9663ea6cbd308508ffcd062b693ce","user":{"login":"nameko","id":12728380,"avatar_url":"https://avatars0.githubusercontent.com/u/12728380?v=4","gravatar_id":"","url":"https://api.github.com/users/nameko","html_url":"https://github.com/nameko","followers_url":"https://api.github.com/users/nameko/followers","following_url":"https://api.github.com/users/nameko/following{/other_user}","gists_url":"https://api.github.com/users/nameko/gists{/gist_id}","starred_url":"https://api.github.com/users/nameko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nameko/subscriptions","organizations_url":"https://api.github.com/users/nameko/orgs","repos_url":"https://api.github.com/users/nameko/repos","events_url":"https://api.github.com/users/nameko/events{/privacy}","received_events_url":"https://api.github.com/users/nameko/received_events","type":"Organization","site_admin":false},"repo":{"id":8431589,"name":"nameko","full_name":"nameko/nameko","owner":{"login":"nameko","id":12728380,"avatar_url":"https://avatars0.githubusercontent.com/u/12728380?v=4","gravatar_id":"","url":"https://api.github.com/users/nameko","html_url":"https://github.com/nameko","followers_url":"https://api.github.com/users/nameko/followers","following_url":"https://api.github.com/users/nameko/following{/other_user}","gists_url":"https://api.github.com/users/nameko/gists{/gist_id}","starred_url":"https://api.github.com/users/nameko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nameko/subscriptions","organizations_url":"https://api.github.com/users/nameko/orgs","repos_url":"https://api.github.com/users/nameko/repos","events_url":"https://api.github.com/users/nameko/events{/privacy}","received_events_url":"https://api.github.com/users/nameko/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nameko/nameko","description":"Python framework for building microservices","fork":false,"url":"https://api.github.com/repos/nameko/nameko","forks_url":"https://api.github.com/repos/nameko/nameko/forks","keys_url":"https://api.github.com/repos/nameko/nameko/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nameko/nameko/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nameko/nameko/teams","hooks_url":"https://api.github.com/repos/nameko/nameko/hooks","issue_events_url":"https://api.github.com/repos/nameko/nameko/issues/events{/number}","events_url":"https://api.github.com/repos/nameko/nameko/events","assignees_url":"https://api.github.com/repos/nameko/nameko/assignees{/user}","branches_url":"https://api.github.com/repos/nameko/nameko/branches{/branch}","tags_url":"https://api.github.com/repos/nameko/nameko/tags","blobs_url":"https://api.github.com/repos/nameko/nameko/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nameko/nameko/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nameko/nameko/git/refs{/sha}","trees_url":"https://api.github.com/repos/nameko/nameko/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nameko/nameko/statuses/{sha}","languages_url":"https://api.github.com/repos/nameko/nameko/languages","stargazers_url":"https://api.github.com/repos/nameko/nameko/stargazers","contributors_url":"https://api.github.com/repos/nameko/nameko/contributors","subscribers_url":"https://api.github.com/repos/nameko/nameko/subscribers","subscription_url":"https://api.github.com/repos/nameko/nameko/subscription","commits_url":"https://api.github.com/repos/nameko/nameko/commits{/sha}","git_commits_url":"https://api.github.com/repos/nameko/nameko/git/commits{/sha}","comments_url":"https://api.github.com/repos/nameko/nameko/comments{/number}","issue_comment_url":"https://api.github.com/repos/nameko/nameko/issues/comments{/number}","contents_url":"https://api.github.com/repos/nameko/nameko/contents/{+path}","compare_url":"https://api.github.com/repos/nameko/nameko/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nameko/nameko/merges","archive_url":"https://api.github.com/repos/nameko/nameko/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nameko/nameko/downloads","issues_url":"https://api.github.com/repos/nameko/nameko/issues{/number}","pulls_url":"https://api.github.com/repos/nameko/nameko/pulls{/number}","milestones_url":"https://api.github.com/repos/nameko/nameko/milestones{/number}","notifications_url":"https://api.github.com/repos/nameko/nameko/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nameko/nameko/labels{/name}","releases_url":"https://api.github.com/repos/nameko/nameko/releases{/id}","deployments_url":"https://api.github.com/repos/nameko/nameko/deployments","created_at":"2013-02-26T11:59:08Z","updated_at":"2018-05-15T08:14:48Z","pushed_at":"2018-05-15T11:42:12Z","git_url":"git://github.com/nameko/nameko.git","ssh_url":"git@github.com:nameko/nameko.git","clone_url":"https://github.com/nameko/nameko.git","svn_url":"https://github.com/nameko/nameko","homepage":"https://nameko.readthedocs.org","size":5350,"stargazers_count":1925,"watchers_count":1925,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":208,"mirror_url":null,"archived":false,"open_issues_count":58,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":208,"open_issues":58,"watchers":1925,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nameko/nameko/pulls/542"},"html":{"href":"https://github.com/nameko/nameko/pull/542"},"issue":{"href":"https://api.github.com/repos/nameko/nameko/issues/542"},"comments":{"href":"https://api.github.com/repos/nameko/nameko/issues/542/comments"},"review_comments":{"href":"https://api.github.com/repos/nameko/nameko/pulls/542/comments"},"review_comment":{"href":"https://api.github.com/repos/nameko/nameko/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nameko/nameko/pulls/542/commits"},"statuses":{"href":"https://api.github.com/repos/nameko/nameko/statuses/0a0abe0162924eb732c4de00be97877d095dd878"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mattbennett"}}