{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Docs/pulls/comments/193497523","pull_request_review_id":126188878,"id":193497523,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzQ5NzUyMw==","diff_hunk":"@@ -0,0 +1,95 @@\n+---\n+title: Use MessagePack Hub Protocol in SignalR for ASP.NET Core\n+author: rachelappel\n+description: Add MessagePack Hub Protocol to ASP.NET Core SignalR.\n+manager: wpickett\n+monikerRange: '>= aspnetcore-2.1'\n+ms.author: rachelap\n+ms.custom: mvc\n+ms.date: 06/04/2018\n+ms.prod: aspnet-core\n+ms.technology: aspnet\n+ms.topic: article\n+uid: signalr/messagepackhubprotocol\n+---\n+\n+# Use MessagePack Hub Protocol in SignalR for ASP.NET Core\n+\n+By [Brennan Conroy](https://github.com/BrennanConroy)\n+\n+This article assumes the reader is familiar with the topics covered in [Get Started](xref:signalr/get-started).\n+\n+## What is MessagePack?\n+\n+[MessagePack](https://msgpack.org/index.html) is a binary serialization format that is fast and compact. It's useful when performance and bandwidth are a concern because it creates smaller packets compared to [JSON](https://www.json.org/). Because it's a binary format, messages are unreadable when looking at network traces and logs unless the bytes are passed through a MessagePack parser. SignalR has added built-in support for the MessagePack format, and provides APIs for the client and server to use.\n+\n+## Configure MessagePack on the server\n+\n+To enable the MessagePack Hub Protocol on the server, install the `Microsoft.AspNetCore.SignalR.Protocols.MessagePack` package in your app. Add `AddMessagePackProtocol` to the `AddSignalR` call to enable MessagePack support on the server.\n+\n+> [!NOTE]\n+> Json is enabled by default. Adding MessagePack enables support for both JSON and MessagePack clients.\n+\n+```csharp\n+services.AddSignalR()\n+    .AddMessagePackProtocol();\n+```\n+\n+To customize how MessagePack will format your data, `AddMessagePackProtocol` takes a Func for configuring options. A property named `FormatterResolvers` is exposed in the options. The `FormatterResolvers` is a list of resolvers that are used by MessagePack to determine the format messages will be in. For more information on how the resolvers work, visit the MessagePack library at [MessagePack-CSharp](https://github.com/neuecc/MessagePack-CSharp). Attributes can be used on the objects you want to serialize to define how they should be handled.","path":"aspnetcore/signalr/messagepackhubprotocol.md","position":38,"original_position":38,"commit_id":"059dce739db6586f694af493ea539ea6767e2748","original_commit_id":"059dce739db6586f694af493ea539ea6767e2748","user":{"login":"anurse","id":7574,"node_id":"MDQ6VXNlcjc1NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/7574?v=4","gravatar_id":"","url":"https://api.github.com/users/anurse","html_url":"https://github.com/anurse","followers_url":"https://api.github.com/users/anurse/followers","following_url":"https://api.github.com/users/anurse/following{/other_user}","gists_url":"https://api.github.com/users/anurse/gists{/gist_id}","starred_url":"https://api.github.com/users/anurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anurse/subscriptions","organizations_url":"https://api.github.com/users/anurse/orgs","repos_url":"https://api.github.com/users/anurse/repos","events_url":"https://api.github.com/users/anurse/events{/privacy}","received_events_url":"https://api.github.com/users/anurse/received_events","type":"User","site_admin":false},"body":"takes a ~~Func~~ **delegate** for configuring options","created_at":"2018-06-06T17:39:28Z","updated_at":"2018-06-06T17:45:34Z","html_url":"https://github.com/aspnet/Docs/pull/6858#discussion_r193497523","pull_request_url":"https://api.github.com/repos/aspnet/Docs/pulls/6858","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/comments/193497523"},"html":{"href":"https://github.com/aspnet/Docs/pull/6858#discussion_r193497523"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/6858"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Docs/pulls/6858","id":192522234,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNTIyMjM0","html_url":"https://github.com/aspnet/Docs/pull/6858","diff_url":"https://github.com/aspnet/Docs/pull/6858.diff","patch_url":"https://github.com/aspnet/Docs/pull/6858.patch","issue_url":"https://api.github.com/repos/aspnet/Docs/issues/6858","number":6858,"state":"open","locked":false,"title":" SignalR/MessagePack Doc #5634 ","user":{"login":"BrennanConroy","id":7574801,"node_id":"MDQ6VXNlcjc1NzQ4MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/7574801?v=4","gravatar_id":"","url":"https://api.github.com/users/BrennanConroy","html_url":"https://github.com/BrennanConroy","followers_url":"https://api.github.com/users/BrennanConroy/followers","following_url":"https://api.github.com/users/BrennanConroy/following{/other_user}","gists_url":"https://api.github.com/users/BrennanConroy/gists{/gist_id}","starred_url":"https://api.github.com/users/BrennanConroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrennanConroy/subscriptions","organizations_url":"https://api.github.com/users/BrennanConroy/orgs","repos_url":"https://api.github.com/users/BrennanConroy/repos","events_url":"https://api.github.com/users/BrennanConroy/events{/privacy}","received_events_url":"https://api.github.com/users/BrennanConroy/received_events","type":"User","site_admin":false},"body":"Fixes #5634\r\n[Int Review Link](https://review.docs.microsoft.com/en-us/aspnet/core/signalr/messagepackhubprotocol?view=aspnetcore-2.1&branch=pr-en-us-6858)","created_at":"2018-06-04T20:41:29Z","updated_at":"2018-06-06T17:45:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5c249ff463a0bcaf81ded249e5afea413cbe744e","assignee":null,"assignees":[],"requested_reviewers":[{"login":"DylanDmitri","id":13950346,"node_id":"MDQ6VXNlcjEzOTUwMzQ2","avatar_url":"https://avatars0.githubusercontent.com/u/13950346?v=4","gravatar_id":"","url":"https://api.github.com/users/DylanDmitri","html_url":"https://github.com/DylanDmitri","followers_url":"https://api.github.com/users/DylanDmitri/followers","following_url":"https://api.github.com/users/DylanDmitri/following{/other_user}","gists_url":"https://api.github.com/users/DylanDmitri/gists{/gist_id}","starred_url":"https://api.github.com/users/DylanDmitri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DylanDmitri/subscriptions","organizations_url":"https://api.github.com/users/DylanDmitri/orgs","repos_url":"https://api.github.com/users/DylanDmitri/repos","events_url":"https://api.github.com/users/DylanDmitri/events{/privacy}","received_events_url":"https://api.github.com/users/DylanDmitri/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Docs/pulls/6858/commits","review_comments_url":"https://api.github.com/repos/aspnet/Docs/pulls/6858/comments","review_comment_url":"https://api.github.com/repos/aspnet/Docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Docs/issues/6858/comments","statuses_url":"https://api.github.com/repos/aspnet/Docs/statuses/059dce739db6586f694af493ea539ea6767e2748","head":{"label":"aspnet:brecon/msgpack","ref":"brecon/msgpack","sha":"059dce739db6586f694af493ea539ea6767e2748","user":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":28239455,"node_id":"MDEwOlJlcG9zaXRvcnkyODIzOTQ1NQ==","name":"Docs","full_name":"aspnet/Docs","owner":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Docs","description":"Documentation for ASP.NET and ASP.NET Core","fork":false,"url":"https://api.github.com/repos/aspnet/Docs","forks_url":"https://api.github.com/repos/aspnet/Docs/forks","keys_url":"https://api.github.com/repos/aspnet/Docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Docs/teams","hooks_url":"https://api.github.com/repos/aspnet/Docs/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Docs/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Docs/events","assignees_url":"https://api.github.com/repos/aspnet/Docs/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Docs/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Docs/tags","blobs_url":"https://api.github.com/repos/aspnet/Docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Docs/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Docs/languages","stargazers_url":"https://api.github.com/repos/aspnet/Docs/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Docs/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Docs/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Docs/subscription","commits_url":"https://api.github.com/repos/aspnet/Docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Docs/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Docs/merges","archive_url":"https://api.github.com/repos/aspnet/Docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Docs/downloads","issues_url":"https://api.github.com/repos/aspnet/Docs/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Docs/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Docs/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Docs/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Docs/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Docs/deployments","created_at":"2014-12-19T17:38:02Z","updated_at":"2018-06-06T15:17:17Z","pushed_at":"2018-06-06T17:44:35Z","git_url":"git://github.com/aspnet/Docs.git","ssh_url":"git@github.com:aspnet/Docs.git","clone_url":"https://github.com/aspnet/Docs.git","svn_url":"https://github.com/aspnet/Docs","homepage":"https://docs.microsoft.com/aspnet","size":623236,"stargazers_count":2847,"watchers_count":2847,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7144,"mirror_url":null,"archived":false,"open_issues_count":361,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7144,"open_issues":361,"watchers":2847,"default_branch":"master"}},"base":{"label":"aspnet:master","ref":"master","sha":"902f50551fbbcc8f1d4419be993c225770a8da91","user":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":28239455,"node_id":"MDEwOlJlcG9zaXRvcnkyODIzOTQ1NQ==","name":"Docs","full_name":"aspnet/Docs","owner":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Docs","description":"Documentation for ASP.NET and ASP.NET Core","fork":false,"url":"https://api.github.com/repos/aspnet/Docs","forks_url":"https://api.github.com/repos/aspnet/Docs/forks","keys_url":"https://api.github.com/repos/aspnet/Docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Docs/teams","hooks_url":"https://api.github.com/repos/aspnet/Docs/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Docs/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Docs/events","assignees_url":"https://api.github.com/repos/aspnet/Docs/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Docs/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Docs/tags","blobs_url":"https://api.github.com/repos/aspnet/Docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Docs/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Docs/languages","stargazers_url":"https://api.github.com/repos/aspnet/Docs/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Docs/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Docs/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Docs/subscription","commits_url":"https://api.github.com/repos/aspnet/Docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Docs/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Docs/merges","archive_url":"https://api.github.com/repos/aspnet/Docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Docs/downloads","issues_url":"https://api.github.com/repos/aspnet/Docs/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Docs/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Docs/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Docs/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Docs/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Docs/deployments","created_at":"2014-12-19T17:38:02Z","updated_at":"2018-06-06T15:17:17Z","pushed_at":"2018-06-06T17:44:35Z","git_url":"git://github.com/aspnet/Docs.git","ssh_url":"git@github.com:aspnet/Docs.git","clone_url":"https://github.com/aspnet/Docs.git","svn_url":"https://github.com/aspnet/Docs","homepage":"https://docs.microsoft.com/aspnet","size":623236,"stargazers_count":2847,"watchers_count":2847,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7144,"mirror_url":null,"archived":false,"open_issues_count":361,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7144,"open_issues":361,"watchers":2847,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/6858"},"html":{"href":"https://github.com/aspnet/Docs/pull/6858"},"issue":{"href":"https://api.github.com/repos/aspnet/Docs/issues/6858"},"comments":{"href":"https://api.github.com/repos/aspnet/Docs/issues/6858/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/6858/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/6858/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Docs/statuses/059dce739db6586f694af493ea539ea6767e2748"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"anurse"}}