{"action":"created","comment":{"url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/comments/68842731","id":68842731,"diff_hunk":"@@ -174,74 +174,60 @@ void Connection_ConnectionShutdown(object sender, ShutdownEventArgs e)\n \n                 if (rejectMessage)\n                 {\n-                    await RejectMessage(channel, message.DeliveryTag, messageId).ConfigureAwait(false);\n+                    await RejectMessage(channel, message.DeliveryTag).ConfigureAwait(false);\n                 }\n                 else\n                 {\n-                    await AcknowledgeMessage(channel, message.DeliveryTag, messageId).ConfigureAwait(false);\n+                    await AcknowledgeMessage(channel, message.DeliveryTag).ConfigureAwait(false);\n                 }\n             }\n+            catch (AlreadyClosedException ex)\n+            {\n+                Logger.Warn($\"Attempt to acknowledge/reject message {messageId} failed because the channel was closed. The message will be requeued.\", ex);\n+            }\n             catch (Exception ex)\n             {\n-                Logger.Warn($\"Error while attempting to process message {messageId}. The message will be rejected.\", ex);\n+                Logger.Warn($\"Error while attempting to process message {messageId}. The message will be requeued.\", ex);","path":"src/NServiceBus.RabbitMQ/Receiving/MessagePump.cs","position":31,"original_position":20,"commit_id":"769116541a382c673e262317a9af9fc14ee97ee1","original_commit_id":"b8d6d9a52e1b6a9d9c5273adea87b289479d0506","user":{"login":"bording","id":753669,"avatar_url":"https://avatars.githubusercontent.com/u/753669?v=3","gravatar_id":"","url":"https://api.github.com/users/bording","html_url":"https://github.com/bording","followers_url":"https://api.github.com/users/bording/followers","following_url":"https://api.github.com/users/bording/following{/other_user}","gists_url":"https://api.github.com/users/bording/gists{/gist_id}","starred_url":"https://api.github.com/users/bording/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bording/subscriptions","organizations_url":"https://api.github.com/users/bording/orgs","repos_url":"https://api.github.com/users/bording/repos","events_url":"https://api.github.com/users/bording/events{/privacy}","received_events_url":"https://api.github.com/users/bording/received_events","type":"User","site_admin":false},"body":"Not really, given the restructuring of the methods and catch blocks. Previously if you got to that catch, something really weird would have happened, so there's a good chance your connection is already lost (which automatically requeues the message), The `RejectMessage` call used to have separate logging for that case, but it doesn't now. I changed the message to indicate that the message would be requeued because A) we call `BasicReject` and it succeeds, or B) the connection is already closed and requeued anyway.\r\n","created_at":"2016-06-28T21:02:49Z","updated_at":"2016-06-28T21:02:49Z","html_url":"https://github.com/Particular/NServiceBus.RabbitMQ/pull/165#discussion_r68842731","pull_request_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/165","_links":{"self":{"href":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/comments/68842731"},"html":{"href":"https://github.com/Particular/NServiceBus.RabbitMQ/pull/165#discussion_r68842731"},"pull_request":{"href":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/165"}}},"pull_request":{"url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/165","id":74698775,"html_url":"https://github.com/Particular/NServiceBus.RabbitMQ/pull/165","diff_url":"https://github.com/Particular/NServiceBus.RabbitMQ/pull/165.diff","patch_url":"https://github.com/Particular/NServiceBus.RabbitMQ/pull/165.patch","issue_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/issues/165","number":165,"state":"open","locked":false,"title":"Optimizations","user":{"login":"bording","id":753669,"avatar_url":"https://avatars.githubusercontent.com/u/753669?v=3","gravatar_id":"","url":"https://api.github.com/users/bording","html_url":"https://github.com/bording","followers_url":"https://api.github.com/users/bording/followers","following_url":"https://api.github.com/users/bording/following{/other_user}","gists_url":"https://api.github.com/users/bording/gists{/gist_id}","starred_url":"https://api.github.com/users/bording/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bording/subscriptions","organizations_url":"https://api.github.com/users/bording/orgs","repos_url":"https://api.github.com/users/bording/repos","events_url":"https://api.github.com/users/bording/events{/privacy}","received_events_url":"https://api.github.com/users/bording/received_events","type":"User","site_admin":false},"body":"This includes several rather small changes that are focused around making a few small tweaks to prevent unnecessary memory allocations.\r\n\r\nThe first commit is also a refactoring that made sense given how the `ChannelProvider` and `ConfirmsAwareChannel` classes are actually the ones that need the `RoutingTopology`, instead of passing it to the` MessageDispatcher` first.\r\n\r\nIf there are any changes here that you'd prefer to have split into a separate PR, let me know and I can do that.","created_at":"2016-06-21T22:48:59Z","updated_at":"2016-06-28T21:02:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39d75dd2b92516c44dfa0f761364f923a250193c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/165/commits","review_comments_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/165/comments","review_comment_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/issues/165/comments","statuses_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/statuses/769116541a382c673e262317a9af9fc14ee97ee1","head":{"label":"Particular:optimize","ref":"optimize","sha":"769116541a382c673e262317a9af9fc14ee97ee1","user":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"repo":{"id":12695271,"name":"NServiceBus.RabbitMQ","full_name":"Particular/NServiceBus.RabbitMQ","owner":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Particular/NServiceBus.RabbitMQ","description":"RabbitMQ transport for NServiceBus","fork":false,"url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ","forks_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/forks","keys_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/teams","hooks_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/hooks","issue_events_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/events","assignees_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/tags","blobs_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/languages","stargazers_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/stargazers","contributors_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/contributors","subscribers_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/subscribers","subscription_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/subscription","commits_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/merges","archive_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/downloads","issues_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/labels{/name}","releases_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/releases{/id}","deployments_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/deployments","created_at":"2013-09-09T07:15:32Z","updated_at":"2016-05-28T05:04:04Z","pushed_at":"2016-06-28T10:00:29Z","git_url":"git://github.com/Particular/NServiceBus.RabbitMQ.git","ssh_url":"git@github.com:Particular/NServiceBus.RabbitMQ.git","clone_url":"https://github.com/Particular/NServiceBus.RabbitMQ.git","svn_url":"https://github.com/Particular/NServiceBus.RabbitMQ","homepage":"http://docs.particular.net/nservicebus/rabbitmq/","size":8880,"stargazers_count":21,"watchers_count":21,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":11,"forks":17,"open_issues":11,"watchers":21,"default_branch":"develop"}},"base":{"label":"Particular:release-4.0.0","ref":"release-4.0.0","sha":"603269706b444db0f693f75a9c4f04f0f0998f38","user":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"repo":{"id":12695271,"name":"NServiceBus.RabbitMQ","full_name":"Particular/NServiceBus.RabbitMQ","owner":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Particular/NServiceBus.RabbitMQ","description":"RabbitMQ transport for NServiceBus","fork":false,"url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ","forks_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/forks","keys_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/teams","hooks_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/hooks","issue_events_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/events","assignees_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/tags","blobs_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/languages","stargazers_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/stargazers","contributors_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/contributors","subscribers_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/subscribers","subscription_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/subscription","commits_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/merges","archive_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/downloads","issues_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/labels{/name}","releases_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/releases{/id}","deployments_url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/deployments","created_at":"2013-09-09T07:15:32Z","updated_at":"2016-05-28T05:04:04Z","pushed_at":"2016-06-28T10:00:29Z","git_url":"git://github.com/Particular/NServiceBus.RabbitMQ.git","ssh_url":"git@github.com:Particular/NServiceBus.RabbitMQ.git","clone_url":"https://github.com/Particular/NServiceBus.RabbitMQ.git","svn_url":"https://github.com/Particular/NServiceBus.RabbitMQ","homepage":"http://docs.particular.net/nservicebus/rabbitmq/","size":8880,"stargazers_count":21,"watchers_count":21,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":11,"forks":17,"open_issues":11,"watchers":21,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/165"},"html":{"href":"https://github.com/Particular/NServiceBus.RabbitMQ/pull/165"},"issue":{"href":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/issues/165"},"comments":{"href":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/issues/165/comments"},"review_comments":{"href":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/165/comments"},"review_comment":{"href":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/165/commits"},"statuses":{"href":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/statuses/769116541a382c673e262317a9af9fc14ee97ee1"}}}}
{"actor":{"display_login":"bording"}}