{"action":"created","comment":{"url":"https://api.github.com/repos/Particular/NServiceBus.RabbitMQ/pulls/comments/68742437","id":68742437,"diff_hunk":"@@ -32,12 +32,15 @@ public static void Fill(this IBasicProperties properties, OutgoingMessage messag\n \n             properties.Headers = message.Headers.ToDictionary(p => p.Key, p => (object)p.Value);\n \n-            if (message.Headers.ContainsKey(NServiceBus.Headers.EnclosedMessageTypes))\n+            string messageTypesHeader;\n+            if (message.Headers.TryGetValue(NServiceBus.Headers.EnclosedMessageTypes, out messageTypesHeader))\n             {\n-                properties.Type = message.Headers[NServiceBus.Headers.EnclosedMessageTypes].Split(new[]\n+                var index = messageTypesHeader.IndexOf(',');\n+\n+                if (index > 0)\n                 {\n-                    ','\n-                }, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault();\n+                    properties.Type = messageTypesHeader.Substring(0, index);\n+                }","path":"src/NServiceBus.RabbitMQ/Sending/BasicPropertiesExtensions.cs","position":16,"original_position":16,"commit_id":"769116541a382c673e262317a9af9fc14ee97ee1","original_commit_id":"1580afd0ddaa5513d2efb98b01594b80dbb0977c","user":{"login":"adamralph","id":677704,"avatar_url":"https://avatars.githubusercontent.com/u/677704?v=3","gravatar_id":"","url":"https://api.github.com/users/adamralph","html_url":"https://github.com/adamralph","followers_url":"https://api.github.com/users/adamralph/followers","following_url":"https://api.github.com/users/adamralph/following{/other_user}","gists_url":"https://api.github.com/users/adamralph/gists{/gist_id}","starred_url":"https://api.github.com/users/adamralph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamralph/subscriptions","organizations_url":"https://api.github.com/users/adamralph/orgs","repos_url":"https://api.github.com/users/adamralph/repos","events_url":"https://api.github.com/users/adamralph/events{/privacy}","received_events_url":"https://api.github.com/users/adamralph/received_events","type":"User","site_admin":false},"body":"This looks like a change in behaviour. Previously, if there were no comma in the header, we'd set `properties.Type` to be the entire header. Now, we're only setting it if there is at least one comma.","created_at":"2016-06-28T11:55:27Z","updated_at":"2016-06-28T11:55:27Z","html_url":"https://github.com/Particular/NServiceBus.RabbitMQ/pull/165#discussion_r68742437","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/68742437"},"html":{"href":"https://github.com/Particular/NServiceBus.RabbitMQ/pull/165#discussion_r68742437"},"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-28T11:55:27Z","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":"adamralph"}}