{"action":"created","comment":{"url":"https://api.github.com/repos/nats-io/nats-site/pulls/comments/71051041","id":71051041,"diff_hunk":"@@ -0,0 +1,199 @@\n++++\n+date = \"2016-07-15\"\n+title = \"NATS Streaming Protocol\"\n+category = \"internals\"\n+[menu.main]\n+  name = \"NATS Streaming Protocol\"\n+  weight = 1\n+  identifier = \"internals-nats-streaming-protocol\"\n+  parent = \"Internals\"\n++++\n+\n+# NATS streaming protocol\n+\n+The NATS streaming protocol sits atop the [core NATS protocol](../nats-protocol) and uses [Google's protocol buffers](https://developers.google.com/protocol-buffers/).  Protocol buffer messages are marshalled into bytes and published as core NATS messages on specific subjects described below.  In communicating with the NATS streaming server, The NATS [request/reply](../../concepts/nats-req-rep) pattern is used for all protocol messages that have a corresponding reply.\n+\n+## NATS streaming protocol conventions\n+\n+**Subject names**: Subject names, including reply subject (INBOX) names, are case-sensitive and must be non-empty alphanumeric strings with no embedded whitespace, and optionally token-delimited using the dot character (`.`), e.g.:\n+\n+`FOO`, `BAR`, `foo.bar`, `foo.BAR`, `FOO.BAR` and `FOO.BAR.BAZ` are all valid subject names\n+\n+`FOO. BAR`, `foo. .bar` and`foo..bar` are *not* valid subject names\n+\n+**Wildcards**: NATS streaming does *not* support wildcards in subject subscriptions.\n+\n+**Protocol definition**: The fields of NATS streaming protocol messages are defined in the go-nats-streaming [protocol file](https://github.com/nats-io/go-nats-streaming/blob/master/pb/protocol.proto).\n+\n+\n+## NATS streaming protocol messages\n+\n+The following table briefly describes the NATS streaming protocol messages.\n+\n+Click the name to see more detailed information, including usage:\n+\n+| Message Name                      | Sent By |    Description\n+| --------------------------------- |:--------|:--------------------------------------------\n+| [`ConnectRequest`](#CONNREQ)      | Client  | Request to connect to the streaming server\n+| [`ConnectResponse`](#CONNRESP)    | Server  | Result of a connection request\n+| [`SubscriptionRequest`](#SUBREQ)  | Client  | Request sent to Subscribe to a subject and retrieve data\n+| [`SubscriptionResponse`](#SUBRESP)| Server  | Result of a subscription request\n+| [`UnsubscribeRequest`](#UNSUBREQ) | Client  | Unsubscribe from a subject\n+| [`PubMsg`](#PUBMSG)               | Client  | Publish a message to a subject, with optional reply subject\n+| [`PubAck`](#PUBACK)               | Server  | An acknowledgement that a published message has been persisted\n+| [`MsgProto`](#MSGPROTO)           | Server  | A message (originally published from a client) to a subscribing client\n+| [`Ack`](#ACK)                     | Client  | Acknowledges that a message has been received\n+| [`CloseRequest`](#CLOSEREQ)       | Client  | Request sent to close the connection to the streaming server\n+| [`CloseResp`](#CLOSERESP)         | Server  | Result of the close request\n+\n+The following sections explain each protocol message.\n+\n+## <a name=\"CONNREQ\"></a>ConnectRequest\n+\n+### Message Structure\n+\n+* `ClientID`: A unique identifier for a client.\n+* `HeartbeatInbox`: An inbox to which the streaming server will send heartbeats to for the client to process.","path":"content/documentation/internals/nats-streaming-protocol.md","position":56,"original_position":56,"commit_id":"8ad906aa76ede45cbd61d38558a259e6bc14c416","original_commit_id":"8ad906aa76ede45cbd61d38558a259e6bc14c416","user":{"login":"ColinSullivan1","id":11180189,"avatar_url":"https://avatars.githubusercontent.com/u/11180189?v=3","gravatar_id":"","url":"https://api.github.com/users/ColinSullivan1","html_url":"https://github.com/ColinSullivan1","followers_url":"https://api.github.com/users/ColinSullivan1/followers","following_url":"https://api.github.com/users/ColinSullivan1/following{/other_user}","gists_url":"https://api.github.com/users/ColinSullivan1/gists{/gist_id}","starred_url":"https://api.github.com/users/ColinSullivan1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColinSullivan1/subscriptions","organizations_url":"https://api.github.com/users/ColinSullivan1/orgs","repos_url":"https://api.github.com/users/ColinSullivan1/repos","events_url":"https://api.github.com/users/ColinSullivan1/events{/privacy}","received_events_url":"https://api.github.com/users/ColinSullivan1/received_events","type":"User","site_admin":false},"body":"Yep, this one I missed.  Thanks.  Will fix.","created_at":"2016-07-15T22:51:30Z","updated_at":"2016-07-15T22:51:30Z","html_url":"https://github.com/nats-io/nats-site/pull/126#discussion_r71051041","pull_request_url":"https://api.github.com/repos/nats-io/nats-site/pulls/126","_links":{"self":{"href":"https://api.github.com/repos/nats-io/nats-site/pulls/comments/71051041"},"html":{"href":"https://github.com/nats-io/nats-site/pull/126#discussion_r71051041"},"pull_request":{"href":"https://api.github.com/repos/nats-io/nats-site/pulls/126"}}},"pull_request":{"url":"https://api.github.com/repos/nats-io/nats-site/pulls/126","id":77682476,"html_url":"https://github.com/nats-io/nats-site/pull/126","diff_url":"https://github.com/nats-io/nats-site/pull/126.diff","patch_url":"https://github.com/nats-io/nats-site/pull/126.patch","issue_url":"https://api.github.com/repos/nats-io/nats-site/issues/126","number":126,"state":"open","locked":false,"title":"Add NATS Streaming Protocol Documentation","user":{"login":"ColinSullivan1","id":11180189,"avatar_url":"https://avatars.githubusercontent.com/u/11180189?v=3","gravatar_id":"","url":"https://api.github.com/users/ColinSullivan1","html_url":"https://github.com/ColinSullivan1","followers_url":"https://api.github.com/users/ColinSullivan1/followers","following_url":"https://api.github.com/users/ColinSullivan1/following{/other_user}","gists_url":"https://api.github.com/users/ColinSullivan1/gists{/gist_id}","starred_url":"https://api.github.com/users/ColinSullivan1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColinSullivan1/subscriptions","organizations_url":"https://api.github.com/users/ColinSullivan1/orgs","repos_url":"https://api.github.com/users/ColinSullivan1/repos","events_url":"https://api.github.com/users/ColinSullivan1/events{/privacy}","received_events_url":"https://api.github.com/users/ColinSullivan1/received_events","type":"User","site_admin":false},"body":"This page describes the NATS Streaming protocol.  The goal is to provide enough information that one could get started building a client.\r\n\r\n@lparis @kozlovic @aricart @mcqueary @bjflanne ","created_at":"2016-07-15T21:39:33Z","updated_at":"2016-07-15T22:51:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee23db195583782a326ec5994328edde25a4aac4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nats-io/nats-site/pulls/126/commits","review_comments_url":"https://api.github.com/repos/nats-io/nats-site/pulls/126/comments","review_comment_url":"https://api.github.com/repos/nats-io/nats-site/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nats-io/nats-site/issues/126/comments","statuses_url":"https://api.github.com/repos/nats-io/nats-site/statuses/8ad906aa76ede45cbd61d38558a259e6bc14c416","head":{"label":"nats-io:add_streaming_protocol","ref":"add_streaming_protocol","sha":"8ad906aa76ede45cbd61d38558a259e6bc14c416","user":{"login":"nats-io","id":10203055,"avatar_url":"https://avatars.githubusercontent.com/u/10203055?v=3","gravatar_id":"","url":"https://api.github.com/users/nats-io","html_url":"https://github.com/nats-io","followers_url":"https://api.github.com/users/nats-io/followers","following_url":"https://api.github.com/users/nats-io/following{/other_user}","gists_url":"https://api.github.com/users/nats-io/gists{/gist_id}","starred_url":"https://api.github.com/users/nats-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nats-io/subscriptions","organizations_url":"https://api.github.com/users/nats-io/orgs","repos_url":"https://api.github.com/users/nats-io/repos","events_url":"https://api.github.com/users/nats-io/events{/privacy}","received_events_url":"https://api.github.com/users/nats-io/received_events","type":"Organization","site_admin":false},"repo":{"id":43908862,"name":"nats-site","full_name":"nats-io/nats-site","owner":{"login":"nats-io","id":10203055,"avatar_url":"https://avatars.githubusercontent.com/u/10203055?v=3","gravatar_id":"","url":"https://api.github.com/users/nats-io","html_url":"https://github.com/nats-io","followers_url":"https://api.github.com/users/nats-io/followers","following_url":"https://api.github.com/users/nats-io/following{/other_user}","gists_url":"https://api.github.com/users/nats-io/gists{/gist_id}","starred_url":"https://api.github.com/users/nats-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nats-io/subscriptions","organizations_url":"https://api.github.com/users/nats-io/orgs","repos_url":"https://api.github.com/users/nats-io/repos","events_url":"https://api.github.com/users/nats-io/events{/privacy}","received_events_url":"https://api.github.com/users/nats-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nats-io/nats-site","description":"nats.io site content","fork":false,"url":"https://api.github.com/repos/nats-io/nats-site","forks_url":"https://api.github.com/repos/nats-io/nats-site/forks","keys_url":"https://api.github.com/repos/nats-io/nats-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nats-io/nats-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nats-io/nats-site/teams","hooks_url":"https://api.github.com/repos/nats-io/nats-site/hooks","issue_events_url":"https://api.github.com/repos/nats-io/nats-site/issues/events{/number}","events_url":"https://api.github.com/repos/nats-io/nats-site/events","assignees_url":"https://api.github.com/repos/nats-io/nats-site/assignees{/user}","branches_url":"https://api.github.com/repos/nats-io/nats-site/branches{/branch}","tags_url":"https://api.github.com/repos/nats-io/nats-site/tags","blobs_url":"https://api.github.com/repos/nats-io/nats-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nats-io/nats-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nats-io/nats-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/nats-io/nats-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nats-io/nats-site/statuses/{sha}","languages_url":"https://api.github.com/repos/nats-io/nats-site/languages","stargazers_url":"https://api.github.com/repos/nats-io/nats-site/stargazers","contributors_url":"https://api.github.com/repos/nats-io/nats-site/contributors","subscribers_url":"https://api.github.com/repos/nats-io/nats-site/subscribers","subscription_url":"https://api.github.com/repos/nats-io/nats-site/subscription","commits_url":"https://api.github.com/repos/nats-io/nats-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/nats-io/nats-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/nats-io/nats-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/nats-io/nats-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/nats-io/nats-site/contents/{+path}","compare_url":"https://api.github.com/repos/nats-io/nats-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nats-io/nats-site/merges","archive_url":"https://api.github.com/repos/nats-io/nats-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nats-io/nats-site/downloads","issues_url":"https://api.github.com/repos/nats-io/nats-site/issues{/number}","pulls_url":"https://api.github.com/repos/nats-io/nats-site/pulls{/number}","milestones_url":"https://api.github.com/repos/nats-io/nats-site/milestones{/number}","notifications_url":"https://api.github.com/repos/nats-io/nats-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nats-io/nats-site/labels{/name}","releases_url":"https://api.github.com/repos/nats-io/nats-site/releases{/id}","deployments_url":"https://api.github.com/repos/nats-io/nats-site/deployments","created_at":"2015-10-08T18:34:13Z","updated_at":"2016-06-06T09:15:36Z","pushed_at":"2016-07-15T21:39:33Z","git_url":"git://github.com/nats-io/nats-site.git","ssh_url":"git@github.com:nats-io/nats-site.git","clone_url":"https://github.com/nats-io/nats-site.git","svn_url":"https://github.com/nats-io/nats-site","homepage":"https://nats.io","size":38997,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":10,"forks":21,"open_issues":10,"watchers":4,"default_branch":"master"}},"base":{"label":"nats-io:master","ref":"master","sha":"2173e1a7bc8898c2a6f61a99d4d7747c19ae2c7b","user":{"login":"nats-io","id":10203055,"avatar_url":"https://avatars.githubusercontent.com/u/10203055?v=3","gravatar_id":"","url":"https://api.github.com/users/nats-io","html_url":"https://github.com/nats-io","followers_url":"https://api.github.com/users/nats-io/followers","following_url":"https://api.github.com/users/nats-io/following{/other_user}","gists_url":"https://api.github.com/users/nats-io/gists{/gist_id}","starred_url":"https://api.github.com/users/nats-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nats-io/subscriptions","organizations_url":"https://api.github.com/users/nats-io/orgs","repos_url":"https://api.github.com/users/nats-io/repos","events_url":"https://api.github.com/users/nats-io/events{/privacy}","received_events_url":"https://api.github.com/users/nats-io/received_events","type":"Organization","site_admin":false},"repo":{"id":43908862,"name":"nats-site","full_name":"nats-io/nats-site","owner":{"login":"nats-io","id":10203055,"avatar_url":"https://avatars.githubusercontent.com/u/10203055?v=3","gravatar_id":"","url":"https://api.github.com/users/nats-io","html_url":"https://github.com/nats-io","followers_url":"https://api.github.com/users/nats-io/followers","following_url":"https://api.github.com/users/nats-io/following{/other_user}","gists_url":"https://api.github.com/users/nats-io/gists{/gist_id}","starred_url":"https://api.github.com/users/nats-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nats-io/subscriptions","organizations_url":"https://api.github.com/users/nats-io/orgs","repos_url":"https://api.github.com/users/nats-io/repos","events_url":"https://api.github.com/users/nats-io/events{/privacy}","received_events_url":"https://api.github.com/users/nats-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nats-io/nats-site","description":"nats.io site content","fork":false,"url":"https://api.github.com/repos/nats-io/nats-site","forks_url":"https://api.github.com/repos/nats-io/nats-site/forks","keys_url":"https://api.github.com/repos/nats-io/nats-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nats-io/nats-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nats-io/nats-site/teams","hooks_url":"https://api.github.com/repos/nats-io/nats-site/hooks","issue_events_url":"https://api.github.com/repos/nats-io/nats-site/issues/events{/number}","events_url":"https://api.github.com/repos/nats-io/nats-site/events","assignees_url":"https://api.github.com/repos/nats-io/nats-site/assignees{/user}","branches_url":"https://api.github.com/repos/nats-io/nats-site/branches{/branch}","tags_url":"https://api.github.com/repos/nats-io/nats-site/tags","blobs_url":"https://api.github.com/repos/nats-io/nats-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nats-io/nats-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nats-io/nats-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/nats-io/nats-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nats-io/nats-site/statuses/{sha}","languages_url":"https://api.github.com/repos/nats-io/nats-site/languages","stargazers_url":"https://api.github.com/repos/nats-io/nats-site/stargazers","contributors_url":"https://api.github.com/repos/nats-io/nats-site/contributors","subscribers_url":"https://api.github.com/repos/nats-io/nats-site/subscribers","subscription_url":"https://api.github.com/repos/nats-io/nats-site/subscription","commits_url":"https://api.github.com/repos/nats-io/nats-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/nats-io/nats-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/nats-io/nats-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/nats-io/nats-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/nats-io/nats-site/contents/{+path}","compare_url":"https://api.github.com/repos/nats-io/nats-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nats-io/nats-site/merges","archive_url":"https://api.github.com/repos/nats-io/nats-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nats-io/nats-site/downloads","issues_url":"https://api.github.com/repos/nats-io/nats-site/issues{/number}","pulls_url":"https://api.github.com/repos/nats-io/nats-site/pulls{/number}","milestones_url":"https://api.github.com/repos/nats-io/nats-site/milestones{/number}","notifications_url":"https://api.github.com/repos/nats-io/nats-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nats-io/nats-site/labels{/name}","releases_url":"https://api.github.com/repos/nats-io/nats-site/releases{/id}","deployments_url":"https://api.github.com/repos/nats-io/nats-site/deployments","created_at":"2015-10-08T18:34:13Z","updated_at":"2016-06-06T09:15:36Z","pushed_at":"2016-07-15T21:39:33Z","git_url":"git://github.com/nats-io/nats-site.git","ssh_url":"git@github.com:nats-io/nats-site.git","clone_url":"https://github.com/nats-io/nats-site.git","svn_url":"https://github.com/nats-io/nats-site","homepage":"https://nats.io","size":38997,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":10,"forks":21,"open_issues":10,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nats-io/nats-site/pulls/126"},"html":{"href":"https://github.com/nats-io/nats-site/pull/126"},"issue":{"href":"https://api.github.com/repos/nats-io/nats-site/issues/126"},"comments":{"href":"https://api.github.com/repos/nats-io/nats-site/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/nats-io/nats-site/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/nats-io/nats-site/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nats-io/nats-site/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/nats-io/nats-site/statuses/8ad906aa76ede45cbd61d38558a259e6bc14c416"}}}}
{"actor":{"display_login":"ColinSullivan1"}}