{"action":"created","comment":{"url":"https://api.github.com/repos/zalando/nakadi/pulls/comments/76216456","id":76216456,"diff_hunk":"@@ -925,6 +1199,67 @@ definitions:\n         items:\n           $ref: '#/definitions/Event'\n \n+  Subscription:\n+    description: |\n+      Subscription is a high level consumption unit. Subscriptions allow applications to easily scale the\n+      number of clients by managing consumed event offsets and distributing load between instances.\n+      The key properties that identify subscription are 'owning_application', 'event_types' and 'consumer_group'.\n+      It's not possible to have two different subscriptions with these properties being the same.\n+    properties:\n+      id:\n+        type: string\n+        format: uuid\n+        readOnly: true\n+        description: |\n+          Id of subscription that was created. Is generated by Nakadi, should not be specified when creating\n+          subscription.\n+      owning_application:\n+        type: string\n+        example: 'gizig'\n+        description: |\n+          The id of application owning the subscription. The reading and modification of subscription will be limited\n+          to this application id.\n+      event_types:\n+        type: array\n+        items:\n+          type: string\n+        description: |\n+          EventTypes to subscribe to.\n+          The order is not important. Subscriptions that differ only be the order of EventTypes will be\n+          considered the same and will have the same id.\n+\n+          * Currently only subscription to a single EventType is supported. Subscriptions with more than one\n+            EventType in event_types property will be rejected.\n+      consumer_group:\n+        type: string\n+        example: 'read-product-updates'\n+        description: |\n+          The value describing the use case of this subscription.\n+          In general that is an additional identifier used to differ subscriptions having the same\n+          owning_application and event_types.\n+        default: 'default'\n+      created_at:\n+        type: string\n+        readOnly: true\n+        description: |\n+          Timestamp of creation of the subscription. Is generated by Nakadi, should not be specified when\n+          creating subscription.","path":"api/nakadi-event-bus-api.yaml","position":null,"original_position":718,"commit_id":"ddf6cb4b18f7e5945738738081583b8e0dc18c02","original_commit_id":"8eecf1c6790edd67b0295bbfbc01319e7ffb0217","user":{"login":"rcillo","id":344648,"avatar_url":"https://avatars.githubusercontent.com/u/344648?v=3","gravatar_id":"","url":"https://api.github.com/users/rcillo","html_url":"https://github.com/rcillo","followers_url":"https://api.github.com/users/rcillo/followers","following_url":"https://api.github.com/users/rcillo/following{/other_user}","gists_url":"https://api.github.com/users/rcillo/gists{/gist_id}","starred_url":"https://api.github.com/users/rcillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcillo/subscriptions","organizations_url":"https://api.github.com/users/rcillo/orgs","repos_url":"https://api.github.com/users/rcillo/repos","events_url":"https://api.github.com/users/rcillo/events{/privacy}","received_events_url":"https://api.github.com/users/rcillo/received_events","type":"User","site_admin":false},"body":"Done https://github.com/zalando/nakadi/pull/353/commits/ddf6cb4b18f7e5945738738081583b8e0dc18c02","created_at":"2016-08-25T10:12:04Z","updated_at":"2016-08-25T10:12:04Z","html_url":"https://github.com/zalando/nakadi/pull/353#discussion_r76216456","pull_request_url":"https://api.github.com/repos/zalando/nakadi/pulls/353","_links":{"self":{"href":"https://api.github.com/repos/zalando/nakadi/pulls/comments/76216456"},"html":{"href":"https://github.com/zalando/nakadi/pull/353#discussion_r76216456"},"pull_request":{"href":"https://api.github.com/repos/zalando/nakadi/pulls/353"}}},"pull_request":{"url":"https://api.github.com/repos/zalando/nakadi/pulls/353","id":78153723,"html_url":"https://github.com/zalando/nakadi/pull/353","diff_url":"https://github.com/zalando/nakadi/pull/353.diff","patch_url":"https://github.com/zalando/nakadi/pull/353.patch","issue_url":"https://api.github.com/repos/zalando/nakadi/issues/353","number":353,"state":"open","locked":false,"title":"Feature/aruha 190 subscription api","user":{"login":"rcillo","id":344648,"avatar_url":"https://avatars.githubusercontent.com/u/344648?v=3","gravatar_id":"","url":"https://api.github.com/users/rcillo","html_url":"https://github.com/rcillo","followers_url":"https://api.github.com/users/rcillo/followers","following_url":"https://api.github.com/users/rcillo/following{/other_user}","gists_url":"https://api.github.com/users/rcillo/gists{/gist_id}","starred_url":"https://api.github.com/users/rcillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcillo/subscriptions","organizations_url":"https://api.github.com/users/rcillo/orgs","repos_url":"https://api.github.com/users/rcillo/repos","events_url":"https://api.github.com/users/rcillo/events{/privacy}","received_events_url":"https://api.github.com/users/rcillo/received_events","type":"User","site_admin":false},"body":"Clients streaming through a subscription do not need to handle offsets persistence or partitions assignment. The workflow is very simple:\r\n\r\n1. First client creates a subscription\r\n2. This client starts streaming from this subscription (which automatically assigns all partitions to it)\r\n3. A new client is launched and tries to create the same subscription\r\n4. Since subscription creation is idempotent, it gets a reference to the existing subscription\r\n5. The new client starts streaming from this subscription, which causes partitions to be reassigned (rebalanced) between clients.\r\n6. Repeat 3-5 until you have as many clients as partitions.\r\n\r\nSubscriptions also provide a mechanism for implementing backpressure using a window size strategy.","created_at":"2016-07-20T14:09:56Z","updated_at":"2016-08-25T10:12:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dafc3ea876b1c75acd27d3ead5c3cf1b52d5f2fe","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zalando/nakadi/pulls/353/commits","review_comments_url":"https://api.github.com/repos/zalando/nakadi/pulls/353/comments","review_comment_url":"https://api.github.com/repos/zalando/nakadi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zalando/nakadi/issues/353/comments","statuses_url":"https://api.github.com/repos/zalando/nakadi/statuses/ddf6cb4b18f7e5945738738081583b8e0dc18c02","head":{"label":"zalando:feature/ARUHA-190-subscription-api","ref":"feature/ARUHA-190-subscription-api","sha":"ddf6cb4b18f7e5945738738081583b8e0dc18c02","user":{"login":"zalando","id":1564818,"avatar_url":"https://avatars.githubusercontent.com/u/1564818?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"repo":{"id":44234368,"name":"nakadi","full_name":"zalando/nakadi","owner":{"login":"zalando","id":1564818,"avatar_url":"https://avatars.githubusercontent.com/u/1564818?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando/nakadi","description":"A distributed event bus that implements a RESTful API abstraction instead of Kafka-like queues","fork":false,"url":"https://api.github.com/repos/zalando/nakadi","forks_url":"https://api.github.com/repos/zalando/nakadi/forks","keys_url":"https://api.github.com/repos/zalando/nakadi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando/nakadi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando/nakadi/teams","hooks_url":"https://api.github.com/repos/zalando/nakadi/hooks","issue_events_url":"https://api.github.com/repos/zalando/nakadi/issues/events{/number}","events_url":"https://api.github.com/repos/zalando/nakadi/events","assignees_url":"https://api.github.com/repos/zalando/nakadi/assignees{/user}","branches_url":"https://api.github.com/repos/zalando/nakadi/branches{/branch}","tags_url":"https://api.github.com/repos/zalando/nakadi/tags","blobs_url":"https://api.github.com/repos/zalando/nakadi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando/nakadi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando/nakadi/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando/nakadi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando/nakadi/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando/nakadi/languages","stargazers_url":"https://api.github.com/repos/zalando/nakadi/stargazers","contributors_url":"https://api.github.com/repos/zalando/nakadi/contributors","subscribers_url":"https://api.github.com/repos/zalando/nakadi/subscribers","subscription_url":"https://api.github.com/repos/zalando/nakadi/subscription","commits_url":"https://api.github.com/repos/zalando/nakadi/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando/nakadi/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando/nakadi/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando/nakadi/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando/nakadi/contents/{+path}","compare_url":"https://api.github.com/repos/zalando/nakadi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando/nakadi/merges","archive_url":"https://api.github.com/repos/zalando/nakadi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando/nakadi/downloads","issues_url":"https://api.github.com/repos/zalando/nakadi/issues{/number}","pulls_url":"https://api.github.com/repos/zalando/nakadi/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando/nakadi/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando/nakadi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando/nakadi/labels{/name}","releases_url":"https://api.github.com/repos/zalando/nakadi/releases{/id}","deployments_url":"https://api.github.com/repos/zalando/nakadi/deployments","created_at":"2015-10-14T08:30:17Z","updated_at":"2016-08-22T13:37:03Z","pushed_at":"2016-08-25T10:11:49Z","git_url":"git://github.com/zalando/nakadi.git","ssh_url":"git@github.com:zalando/nakadi.git","clone_url":"https://github.com/zalando/nakadi.git","svn_url":"https://github.com/zalando/nakadi","homepage":"","size":3503,"stargazers_count":39,"watchers_count":39,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":18,"forks":24,"open_issues":18,"watchers":39,"default_branch":"master"}},"base":{"label":"zalando:nakadi-jvm","ref":"nakadi-jvm","sha":"bf447f0cd03186bd5ae76f575489ef7f4ee083b9","user":{"login":"zalando","id":1564818,"avatar_url":"https://avatars.githubusercontent.com/u/1564818?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"repo":{"id":44234368,"name":"nakadi","full_name":"zalando/nakadi","owner":{"login":"zalando","id":1564818,"avatar_url":"https://avatars.githubusercontent.com/u/1564818?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando","html_url":"https://github.com/zalando","followers_url":"https://api.github.com/users/zalando/followers","following_url":"https://api.github.com/users/zalando/following{/other_user}","gists_url":"https://api.github.com/users/zalando/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando/subscriptions","organizations_url":"https://api.github.com/users/zalando/orgs","repos_url":"https://api.github.com/users/zalando/repos","events_url":"https://api.github.com/users/zalando/events{/privacy}","received_events_url":"https://api.github.com/users/zalando/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando/nakadi","description":"A distributed event bus that implements a RESTful API abstraction instead of Kafka-like queues","fork":false,"url":"https://api.github.com/repos/zalando/nakadi","forks_url":"https://api.github.com/repos/zalando/nakadi/forks","keys_url":"https://api.github.com/repos/zalando/nakadi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando/nakadi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando/nakadi/teams","hooks_url":"https://api.github.com/repos/zalando/nakadi/hooks","issue_events_url":"https://api.github.com/repos/zalando/nakadi/issues/events{/number}","events_url":"https://api.github.com/repos/zalando/nakadi/events","assignees_url":"https://api.github.com/repos/zalando/nakadi/assignees{/user}","branches_url":"https://api.github.com/repos/zalando/nakadi/branches{/branch}","tags_url":"https://api.github.com/repos/zalando/nakadi/tags","blobs_url":"https://api.github.com/repos/zalando/nakadi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando/nakadi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando/nakadi/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando/nakadi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando/nakadi/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando/nakadi/languages","stargazers_url":"https://api.github.com/repos/zalando/nakadi/stargazers","contributors_url":"https://api.github.com/repos/zalando/nakadi/contributors","subscribers_url":"https://api.github.com/repos/zalando/nakadi/subscribers","subscription_url":"https://api.github.com/repos/zalando/nakadi/subscription","commits_url":"https://api.github.com/repos/zalando/nakadi/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando/nakadi/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando/nakadi/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando/nakadi/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando/nakadi/contents/{+path}","compare_url":"https://api.github.com/repos/zalando/nakadi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando/nakadi/merges","archive_url":"https://api.github.com/repos/zalando/nakadi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando/nakadi/downloads","issues_url":"https://api.github.com/repos/zalando/nakadi/issues{/number}","pulls_url":"https://api.github.com/repos/zalando/nakadi/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando/nakadi/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando/nakadi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando/nakadi/labels{/name}","releases_url":"https://api.github.com/repos/zalando/nakadi/releases{/id}","deployments_url":"https://api.github.com/repos/zalando/nakadi/deployments","created_at":"2015-10-14T08:30:17Z","updated_at":"2016-08-22T13:37:03Z","pushed_at":"2016-08-25T10:11:49Z","git_url":"git://github.com/zalando/nakadi.git","ssh_url":"git@github.com:zalando/nakadi.git","clone_url":"https://github.com/zalando/nakadi.git","svn_url":"https://github.com/zalando/nakadi","homepage":"","size":3503,"stargazers_count":39,"watchers_count":39,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":18,"forks":24,"open_issues":18,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zalando/nakadi/pulls/353"},"html":{"href":"https://github.com/zalando/nakadi/pull/353"},"issue":{"href":"https://api.github.com/repos/zalando/nakadi/issues/353"},"comments":{"href":"https://api.github.com/repos/zalando/nakadi/issues/353/comments"},"review_comments":{"href":"https://api.github.com/repos/zalando/nakadi/pulls/353/comments"},"review_comment":{"href":"https://api.github.com/repos/zalando/nakadi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zalando/nakadi/pulls/353/commits"},"statuses":{"href":"https://api.github.com/repos/zalando/nakadi/statuses/ddf6cb4b18f7e5945738738081583b8e0dc18c02"}}}}
{"actor":{"display_login":"rcillo"}}