{"action":"closed","number":301,"pull_request":{"url":"https://api.github.com/repos/rebus-org/Rebus/pulls/301","id":30649258,"html_url":"https://github.com/rebus-org/Rebus/pull/301","diff_url":"https://github.com/rebus-org/Rebus/pull/301.diff","patch_url":"https://github.com/rebus-org/Rebus/pull/301.patch","issue_url":"https://api.github.com/repos/rebus-org/Rebus/issues/301","number":301,"state":"closed","locked":false,"title":"Fix ASB multiple message receive in the same transaction","user":{"login":"AndreaCuneo","id":5227688,"avatar_url":"https://avatars.githubusercontent.com/u/5227688?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreaCuneo","html_url":"https://github.com/AndreaCuneo","followers_url":"https://api.github.com/users/AndreaCuneo/followers","following_url":"https://api.github.com/users/AndreaCuneo/following{/other_user}","gists_url":"https://api.github.com/users/AndreaCuneo/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreaCuneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreaCuneo/subscriptions","organizations_url":"https://api.github.com/users/AndreaCuneo/orgs","repos_url":"https://api.github.com/users/AndreaCuneo/repos","events_url":"https://api.github.com/users/AndreaCuneo/events{/privacy}","received_events_url":"https://api.github.com/users/AndreaCuneo/received_events","type":"User","site_admin":false},"body":"When receiving multiple messages in the same transaction context, the ASB transport would fail because it was doing the following on each receive.\r\n\r\n````\r\nif (context[AzureServiceBusMessageBatch] != null)\r\n    throw [...];\r\n\r\ncontext[AzureServiceBusMessageBatch] = new List<Tuple<string, Envelope>>();\r\n````\r\n\r\nI triggered this bug while testing the ReturnToSourceQueue.AzureServiceBus tool.\r\n\r\nFor safeness, I added a check not to fail on commit when no messages haven't been enqueued but the commit has been called. I can remove this bit if you prefer.\r\n\r\nI've see no tests section regarding receiving multiple messages in the same transaction. Did I missed them?\r\n","created_at":"2015-03-06T14:41:15Z","updated_at":"2015-03-11T18:31:43Z","closed_at":"2015-03-11T18:31:43Z","merged_at":"2015-03-11T18:31:43Z","merge_commit_sha":"cafbaee60700083d80e8725b7a6219245ae68622","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rebus-org/Rebus/pulls/301/commits","review_comments_url":"https://api.github.com/repos/rebus-org/Rebus/pulls/301/comments","review_comment_url":"https://api.github.com/repos/rebus-org/Rebus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rebus-org/Rebus/issues/301/comments","statuses_url":"https://api.github.com/repos/rebus-org/Rebus/statuses/7a0dae6d6f729d774ca54f5ae16d673d4e8e3c54","head":{"label":"AndreaCuneo:fix/asb-multiple-receive-per-transaction","ref":"fix/asb-multiple-receive-per-transaction","sha":"7a0dae6d6f729d774ca54f5ae16d673d4e8e3c54","user":{"login":"AndreaCuneo","id":5227688,"avatar_url":"https://avatars.githubusercontent.com/u/5227688?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreaCuneo","html_url":"https://github.com/AndreaCuneo","followers_url":"https://api.github.com/users/AndreaCuneo/followers","following_url":"https://api.github.com/users/AndreaCuneo/following{/other_user}","gists_url":"https://api.github.com/users/AndreaCuneo/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreaCuneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreaCuneo/subscriptions","organizations_url":"https://api.github.com/users/AndreaCuneo/orgs","repos_url":"https://api.github.com/users/AndreaCuneo/repos","events_url":"https://api.github.com/users/AndreaCuneo/events{/privacy}","received_events_url":"https://api.github.com/users/AndreaCuneo/received_events","type":"User","site_admin":false},"repo":{"id":31671753,"name":"Rebus","full_name":"AndreaCuneo/Rebus","owner":{"login":"AndreaCuneo","id":5227688,"avatar_url":"https://avatars.githubusercontent.com/u/5227688?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreaCuneo","html_url":"https://github.com/AndreaCuneo","followers_url":"https://api.github.com/users/AndreaCuneo/followers","following_url":"https://api.github.com/users/AndreaCuneo/following{/other_user}","gists_url":"https://api.github.com/users/AndreaCuneo/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreaCuneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreaCuneo/subscriptions","organizations_url":"https://api.github.com/users/AndreaCuneo/orgs","repos_url":"https://api.github.com/users/AndreaCuneo/repos","events_url":"https://api.github.com/users/AndreaCuneo/events{/privacy}","received_events_url":"https://api.github.com/users/AndreaCuneo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AndreaCuneo/Rebus","description":"Rebus is a lean service bus implementation for .NET, similar in nature to NServiceBus and MassTransit, only leaner.","fork":true,"url":"https://api.github.com/repos/AndreaCuneo/Rebus","forks_url":"https://api.github.com/repos/AndreaCuneo/Rebus/forks","keys_url":"https://api.github.com/repos/AndreaCuneo/Rebus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AndreaCuneo/Rebus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AndreaCuneo/Rebus/teams","hooks_url":"https://api.github.com/repos/AndreaCuneo/Rebus/hooks","issue_events_url":"https://api.github.com/repos/AndreaCuneo/Rebus/issues/events{/number}","events_url":"https://api.github.com/repos/AndreaCuneo/Rebus/events","assignees_url":"https://api.github.com/repos/AndreaCuneo/Rebus/assignees{/user}","branches_url":"https://api.github.com/repos/AndreaCuneo/Rebus/branches{/branch}","tags_url":"https://api.github.com/repos/AndreaCuneo/Rebus/tags","blobs_url":"https://api.github.com/repos/AndreaCuneo/Rebus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AndreaCuneo/Rebus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AndreaCuneo/Rebus/git/refs{/sha}","trees_url":"https://api.github.com/repos/AndreaCuneo/Rebus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AndreaCuneo/Rebus/statuses/{sha}","languages_url":"https://api.github.com/repos/AndreaCuneo/Rebus/languages","stargazers_url":"https://api.github.com/repos/AndreaCuneo/Rebus/stargazers","contributors_url":"https://api.github.com/repos/AndreaCuneo/Rebus/contributors","subscribers_url":"https://api.github.com/repos/AndreaCuneo/Rebus/subscribers","subscription_url":"https://api.github.com/repos/AndreaCuneo/Rebus/subscription","commits_url":"https://api.github.com/repos/AndreaCuneo/Rebus/commits{/sha}","git_commits_url":"https://api.github.com/repos/AndreaCuneo/Rebus/git/commits{/sha}","comments_url":"https://api.github.com/repos/AndreaCuneo/Rebus/comments{/number}","issue_comment_url":"https://api.github.com/repos/AndreaCuneo/Rebus/issues/comments{/number}","contents_url":"https://api.github.com/repos/AndreaCuneo/Rebus/contents/{+path}","compare_url":"https://api.github.com/repos/AndreaCuneo/Rebus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AndreaCuneo/Rebus/merges","archive_url":"https://api.github.com/repos/AndreaCuneo/Rebus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AndreaCuneo/Rebus/downloads","issues_url":"https://api.github.com/repos/AndreaCuneo/Rebus/issues{/number}","pulls_url":"https://api.github.com/repos/AndreaCuneo/Rebus/pulls{/number}","milestones_url":"https://api.github.com/repos/AndreaCuneo/Rebus/milestones{/number}","notifications_url":"https://api.github.com/repos/AndreaCuneo/Rebus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AndreaCuneo/Rebus/labels{/name}","releases_url":"https://api.github.com/repos/AndreaCuneo/Rebus/releases{/id}","created_at":"2015-03-04T18:04:37Z","updated_at":"2015-03-06T14:27:44Z","pushed_at":"2015-03-06T14:31:13Z","git_url":"git://github.com/AndreaCuneo/Rebus.git","ssh_url":"git@github.com:AndreaCuneo/Rebus.git","clone_url":"https://github.com/AndreaCuneo/Rebus.git","svn_url":"https://github.com/AndreaCuneo/Rebus","homepage":"http://mookid.dk/oncode/rebus","size":141214,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rebus-org:master","ref":"master","sha":"760e96997116300d2d08cf464429a934edddadda","user":{"login":"rebus-org","id":5365806,"avatar_url":"https://avatars.githubusercontent.com/u/5365806?v=3","gravatar_id":"","url":"https://api.github.com/users/rebus-org","html_url":"https://github.com/rebus-org","followers_url":"https://api.github.com/users/rebus-org/followers","following_url":"https://api.github.com/users/rebus-org/following{/other_user}","gists_url":"https://api.github.com/users/rebus-org/gists{/gist_id}","starred_url":"https://api.github.com/users/rebus-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebus-org/subscriptions","organizations_url":"https://api.github.com/users/rebus-org/orgs","repos_url":"https://api.github.com/users/rebus-org/repos","events_url":"https://api.github.com/users/rebus-org/events{/privacy}","received_events_url":"https://api.github.com/users/rebus-org/received_events","type":"Organization","site_admin":false},"repo":{"id":2425099,"name":"Rebus","full_name":"rebus-org/Rebus","owner":{"login":"rebus-org","id":5365806,"avatar_url":"https://avatars.githubusercontent.com/u/5365806?v=3","gravatar_id":"","url":"https://api.github.com/users/rebus-org","html_url":"https://github.com/rebus-org","followers_url":"https://api.github.com/users/rebus-org/followers","following_url":"https://api.github.com/users/rebus-org/following{/other_user}","gists_url":"https://api.github.com/users/rebus-org/gists{/gist_id}","starred_url":"https://api.github.com/users/rebus-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebus-org/subscriptions","organizations_url":"https://api.github.com/users/rebus-org/orgs","repos_url":"https://api.github.com/users/rebus-org/repos","events_url":"https://api.github.com/users/rebus-org/events{/privacy}","received_events_url":"https://api.github.com/users/rebus-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rebus-org/Rebus","description":"Rebus is a lean service bus implementation for .NET, similar in nature to NServiceBus and MassTransit, only leaner.","fork":false,"url":"https://api.github.com/repos/rebus-org/Rebus","forks_url":"https://api.github.com/repos/rebus-org/Rebus/forks","keys_url":"https://api.github.com/repos/rebus-org/Rebus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rebus-org/Rebus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rebus-org/Rebus/teams","hooks_url":"https://api.github.com/repos/rebus-org/Rebus/hooks","issue_events_url":"https://api.github.com/repos/rebus-org/Rebus/issues/events{/number}","events_url":"https://api.github.com/repos/rebus-org/Rebus/events","assignees_url":"https://api.github.com/repos/rebus-org/Rebus/assignees{/user}","branches_url":"https://api.github.com/repos/rebus-org/Rebus/branches{/branch}","tags_url":"https://api.github.com/repos/rebus-org/Rebus/tags","blobs_url":"https://api.github.com/repos/rebus-org/Rebus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rebus-org/Rebus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rebus-org/Rebus/git/refs{/sha}","trees_url":"https://api.github.com/repos/rebus-org/Rebus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rebus-org/Rebus/statuses/{sha}","languages_url":"https://api.github.com/repos/rebus-org/Rebus/languages","stargazers_url":"https://api.github.com/repos/rebus-org/Rebus/stargazers","contributors_url":"https://api.github.com/repos/rebus-org/Rebus/contributors","subscribers_url":"https://api.github.com/repos/rebus-org/Rebus/subscribers","subscription_url":"https://api.github.com/repos/rebus-org/Rebus/subscription","commits_url":"https://api.github.com/repos/rebus-org/Rebus/commits{/sha}","git_commits_url":"https://api.github.com/repos/rebus-org/Rebus/git/commits{/sha}","comments_url":"https://api.github.com/repos/rebus-org/Rebus/comments{/number}","issue_comment_url":"https://api.github.com/repos/rebus-org/Rebus/issues/comments{/number}","contents_url":"https://api.github.com/repos/rebus-org/Rebus/contents/{+path}","compare_url":"https://api.github.com/repos/rebus-org/Rebus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rebus-org/Rebus/merges","archive_url":"https://api.github.com/repos/rebus-org/Rebus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rebus-org/Rebus/downloads","issues_url":"https://api.github.com/repos/rebus-org/Rebus/issues{/number}","pulls_url":"https://api.github.com/repos/rebus-org/Rebus/pulls{/number}","milestones_url":"https://api.github.com/repos/rebus-org/Rebus/milestones{/number}","notifications_url":"https://api.github.com/repos/rebus-org/Rebus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rebus-org/Rebus/labels{/name}","releases_url":"https://api.github.com/repos/rebus-org/Rebus/releases{/id}","created_at":"2011-09-20T20:06:26Z","updated_at":"2015-03-11T16:33:53Z","pushed_at":"2015-03-11T18:31:43Z","git_url":"git://github.com/rebus-org/Rebus.git","ssh_url":"git@github.com:rebus-org/Rebus.git","clone_url":"https://github.com/rebus-org/Rebus.git","svn_url":"https://github.com/rebus-org/Rebus","homepage":"http://mookid.dk/oncode/rebus","size":141214,"stargazers_count":196,"watchers_count":196,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":35,"forks":87,"open_issues":35,"watchers":196,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rebus-org/Rebus/pulls/301"},"html":{"href":"https://github.com/rebus-org/Rebus/pull/301"},"issue":{"href":"https://api.github.com/repos/rebus-org/Rebus/issues/301"},"comments":{"href":"https://api.github.com/repos/rebus-org/Rebus/issues/301/comments"},"review_comments":{"href":"https://api.github.com/repos/rebus-org/Rebus/pulls/301/comments"},"review_comment":{"href":"https://api.github.com/repos/rebus-org/Rebus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rebus-org/Rebus/pulls/301/commits"},"statuses":{"href":"https://api.github.com/repos/rebus-org/Rebus/statuses/7a0dae6d6f729d774ca54f5ae16d673d4e8e3c54"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"mookid8000","id":32968,"avatar_url":"https://avatars.githubusercontent.com/u/32968?v=3","gravatar_id":"","url":"https://api.github.com/users/mookid8000","html_url":"https://github.com/mookid8000","followers_url":"https://api.github.com/users/mookid8000/followers","following_url":"https://api.github.com/users/mookid8000/following{/other_user}","gists_url":"https://api.github.com/users/mookid8000/gists{/gist_id}","starred_url":"https://api.github.com/users/mookid8000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mookid8000/subscriptions","organizations_url":"https://api.github.com/users/mookid8000/orgs","repos_url":"https://api.github.com/users/mookid8000/repos","events_url":"https://api.github.com/users/mookid8000/events{/privacy}","received_events_url":"https://api.github.com/users/mookid8000/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":2,"changed_files":1}}