{"action":"created","comment":{"url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/comments/81852735","pull_request_review_id":2799139,"id":81852735,"diff_hunk":"@@ -104,33 +107,41 @@ public void Start()\n             stopping = false;\n             pipelineInvocationTasks = new ConcurrentDictionary<Task, Task>();\n \n-            internalReceiver = clientEntities.Get(fullPath, entity.Namespace.Alias);\n-\n-            if (internalReceiver == null)\n+            \n+            for(var i = 0; i < numberOfClients; i++)\n             {\n-                throw new Exception($\"MessageReceiverNotifier did not get a MessageReceiver instance for entity path {fullPath}, this is probably due to a misconfiguration of the topology\");\n-            }\n \n-            Func<BrokeredMessage, Task> callback = message =>\n-            {\n-                var processTask = ProcessMessageAsync(message);\n-                pipelineInvocationTasks.TryAdd(processTask, processTask);\n-                processTask.ContinueWith(t =>\n+                var internalReceiver = clientEntities.Get(fullPath, entity.Namespace.Alias);\n+\n+                if (internalReceiver == null)\n                 {\n-                    Task toBeRemoved;\n-                    pipelineInvocationTasks.TryRemove(t, out toBeRemoved);\n-                }, TaskContinuationOptions.ExecuteSynchronously);\n-                return processTask;\n-            };\n+                    throw new Exception($\"MessageReceiverNotifier did not get a MessageReceiver instance for entity path {fullPath}, this is probably due to a misconfiguration of the topology\");\n+                }\n \n-            isRunning = true;\n+                Func<BrokeredMessage, Task> callback = message =>\n+                {\n+                    var processTask = ProcessMessageAsync(internalReceiver, message);\n+                    pipelineInvocationTasks.TryAdd(processTask, processTask);\n+                    processTask.ContinueWith(t =>\n+                    {\n+                        Task toBeRemoved;\n+                        pipelineInvocationTasks.TryRemove(t, out toBeRemoved);\n+                    }, TaskContinuationOptions.ExecuteSynchronously);\n+                    return processTask;\n+                };\n+\n+                isRunning = true;","path":"src/Transport/Receiving/MessageReceiverNotifier.cs","position":75,"original_position":75,"commit_id":"e8bf90d2ece36052aefa080edc94f436784a7d29","original_commit_id":"e8bf90d2ece36052aefa080edc94f436784a7d29","user":{"login":"SeanFeldman","id":1309622,"avatar_url":"https://avatars.githubusercontent.com/u/1309622?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanFeldman","html_url":"https://github.com/SeanFeldman","followers_url":"https://api.github.com/users/SeanFeldman/followers","following_url":"https://api.github.com/users/SeanFeldman/following{/other_user}","gists_url":"https://api.github.com/users/SeanFeldman/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanFeldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanFeldman/subscriptions","organizations_url":"https://api.github.com/users/SeanFeldman/orgs","repos_url":"https://api.github.com/users/SeanFeldman/repos","events_url":"https://api.github.com/users/SeanFeldman/events{/privacy}","received_events_url":"https://api.github.com/users/SeanFeldman/received_events","type":"User","site_admin":false},"body":"This is not part of this PR, but I wonder if we better off to set `isRunning` to `true` when we're done with the receiver? I.e. after `internalReceiver.OnMessage(callback, options);` is invoked?","created_at":"2016-10-04T21:00:16Z","updated_at":"2016-10-04T21:41:51Z","html_url":"https://github.com/Particular/NServiceBus.AzureServiceBus/pull/354#discussion_r81852735","pull_request_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/354","_links":{"self":{"href":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/comments/81852735"},"html":{"href":"https://github.com/Particular/NServiceBus.AzureServiceBus/pull/354#discussion_r81852735"},"pull_request":{"href":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/354"}}},"pull_request":{"url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/354","id":87856815,"html_url":"https://github.com/Particular/NServiceBus.AzureServiceBus/pull/354","diff_url":"https://github.com/Particular/NServiceBus.AzureServiceBus/pull/354.diff","patch_url":"https://github.com/Particular/NServiceBus.AzureServiceBus/pull/354.patch","issue_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/354","number":354,"state":"open","locked":false,"title":"[WIP] Spike performance tuning","user":{"login":"yvesgoeleven","id":471354,"avatar_url":"https://avatars.githubusercontent.com/u/471354?v=3","gravatar_id":"","url":"https://api.github.com/users/yvesgoeleven","html_url":"https://github.com/yvesgoeleven","followers_url":"https://api.github.com/users/yvesgoeleven/followers","following_url":"https://api.github.com/users/yvesgoeleven/following{/other_user}","gists_url":"https://api.github.com/users/yvesgoeleven/gists{/gist_id}","starred_url":"https://api.github.com/users/yvesgoeleven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yvesgoeleven/subscriptions","organizations_url":"https://api.github.com/users/yvesgoeleven/orgs","repos_url":"https://api.github.com/users/yvesgoeleven/repos","events_url":"https://api.github.com/users/yvesgoeleven/events{/privacy}","received_events_url":"https://api.github.com/users/yvesgoeleven/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-04T09:07:53Z","updated_at":"2016-10-04T21:41:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e594e17c1151763b48af0d3895ce67e601d74d96","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/354/commits","review_comments_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/354/comments","review_comment_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/354/comments","statuses_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/statuses/e8bf90d2ece36052aefa080edc94f436784a7d29","head":{"label":"Particular:spike-performance-tuning","ref":"spike-performance-tuning","sha":"e8bf90d2ece36052aefa080edc94f436784a7d29","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":29854622,"name":"NServiceBus.AzureServiceBus","full_name":"Particular/NServiceBus.AzureServiceBus","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.AzureServiceBus","description":"The Azure ServiceBus Transport","fork":false,"url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus","forks_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/forks","keys_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/teams","hooks_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/hooks","issue_events_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/events","assignees_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/tags","blobs_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/languages","stargazers_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/stargazers","contributors_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/contributors","subscribers_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/subscribers","subscription_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/subscription","commits_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/merges","archive_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/downloads","issues_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/labels{/name}","releases_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/releases{/id}","deployments_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/deployments","created_at":"2015-01-26T09:43:55Z","updated_at":"2016-10-03T21:45:53Z","pushed_at":"2016-10-04T17:06:39Z","git_url":"git://github.com/Particular/NServiceBus.AzureServiceBus.git","ssh_url":"git@github.com:Particular/NServiceBus.AzureServiceBus.git","clone_url":"https://github.com/Particular/NServiceBus.AzureServiceBus.git","svn_url":"https://github.com/Particular/NServiceBus.AzureServiceBus","homepage":"https://docs.particular.net/nservicebus/azure-service-bus/","size":3105,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":21,"forks":11,"open_issues":21,"watchers":3,"default_branch":"develop"}},"base":{"label":"Particular:release-7.0.0","ref":"release-7.0.0","sha":"70beff9c426036fe37c62869c3c5603a09787010","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":29854622,"name":"NServiceBus.AzureServiceBus","full_name":"Particular/NServiceBus.AzureServiceBus","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.AzureServiceBus","description":"The Azure ServiceBus Transport","fork":false,"url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus","forks_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/forks","keys_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/teams","hooks_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/hooks","issue_events_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/events","assignees_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/tags","blobs_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/languages","stargazers_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/stargazers","contributors_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/contributors","subscribers_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/subscribers","subscription_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/subscription","commits_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/merges","archive_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/downloads","issues_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/labels{/name}","releases_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/releases{/id}","deployments_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/deployments","created_at":"2015-01-26T09:43:55Z","updated_at":"2016-10-03T21:45:53Z","pushed_at":"2016-10-04T17:06:39Z","git_url":"git://github.com/Particular/NServiceBus.AzureServiceBus.git","ssh_url":"git@github.com:Particular/NServiceBus.AzureServiceBus.git","clone_url":"https://github.com/Particular/NServiceBus.AzureServiceBus.git","svn_url":"https://github.com/Particular/NServiceBus.AzureServiceBus","homepage":"https://docs.particular.net/nservicebus/azure-service-bus/","size":3105,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":21,"forks":11,"open_issues":21,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/354"},"html":{"href":"https://github.com/Particular/NServiceBus.AzureServiceBus/pull/354"},"issue":{"href":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/354"},"comments":{"href":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/354/comments"},"review_comments":{"href":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/354/comments"},"review_comment":{"href":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/pulls/354/commits"},"statuses":{"href":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/statuses/e8bf90d2ece36052aefa080edc94f436784a7d29"}}}}
{"actor":{"display_login":"SeanFeldman"}}