{"action":"created","comment":{"url":"https://api.github.com/repos/kaaproject/kaa/pulls/comments/68382136","id":68382136,"diff_hunk":"@@ -4,4 +4,726 @@ title: Notifications\n permalink: /:path/\n sort_idx: 70\n ---\n-Purpose of notifications. Schemas and versioning. Topics, visibility (EP groups related), TTL, and subscriptions (mandatory and optional).\n+{% assign root_url = page.url | split: '/'%}\n+{% capture root_url  %} /{{root_url[1]}}/{{root_url[2]}}/{% endcapture %}\n+\n+* TOC\n+{:toc}\n+\n+The Kaa notification subsystem enables delivery of messages from the Kaa server to endpoints. The structure of the data that is carried by notifications is defined by the notification schema, which is configured on the Kaa server and built into Kaa endpoints. Please review the Kaa [notifications design reference]() for more details.\n+\n+This guide will familiarize you with the basic concepts of Kaa notifications and programming of the Kaa notification subsystem. It is assumed that you have already set up either a [Kaa Sandbox]() or a [full-blown Kaa cluster]() and that you have created at least one [tenant]() and one [application]() in Kaa. \n+We also recommend that you review [collecting endpoint profiles guide]() and [endpoint groups]({{root_url}}Programming-guide/Key-platform-features/Endpoint-groups) before you proceed with this guide.\n+\n+### Basic architecture\n+The following diagram illustrates basic entities and data flows in scope of the notification management:\n+Notifications are generated based on the notification schema created by the developer for the application \n+The user or admin sends a notification using either Admin UI or REST API\n+\n+The following diagram illustrates basic entities and data flows in scope of the notification management:\n+\n+* Notifications are generated based on the [notification schema]() created by the developer for the application \n+* The user or admin sends a notification using either [Admin UI]() or [REST API]( {{root_url}}Programming-guide/Server-REST-APIs/#TODO )\n+\n+![](images/basic_architecture_notification.png)\n+\n+### Configuring Kaa\n+This section provides guidance on how to configure notifications in Kaa.\n+\n+**Notification schema**\n+\n+\n+The default notification schema installed for Kaa applications is empty. You can configure your own notification schema using the Admin UI or REST API. For the purpose of this guide, we will use a simple notification schema shown in the following code block.\n+\n+```json\n+{ \n+    \"type\":\"record\",\n+    \"name\":\"ExampleNotification\",\n+    \"namespace\":\"org.kaaproject.kaa.schema.sample.notification\",\n+    \"fields\":[ \n+        { \n+            \"name\":\"message\",\n+            \"type\":\"string\"\n+        }\n+    ]\n+}\n+```\n+\n+\n+#### Notification topics\n+\n+\n+Notifications in Kaa are organized into topics. Each topic may be associated with one or more endpoint groups. To subscribe to a specific notification, endpoints must belong to one or more endpoint groups that are associated with the corresponding notification topic.\n+\n+Topics can be mandatory or optional. Mandatory topic notifications are delivered in an enforced manner. Optional topics require subscription. It is responsibility of the client code to add notification listeners and subscribe to optional topics.\n+\n+You can manage notification topics via [Admin UI]() or [REST API]( {{root_url}}Programming-guide/Server-REST-APIs/#TODO ).\n+\n+> Once created, a notification topic does not impact any endpoints. To deliver notifications to some endpoint, at first you need to assign the topic to an endpoint group containing this endpoint via [Admin UI]() or [REST API]({{root_url}}Programming-guide/Server-REST-APIs/#TODO).","path":"doc/Programming-guide/Key-platform-features/Notifications/index.md","position":60,"original_position":60,"commit_id":"adc6c98c2daadd6c5169b3a1735a678e11838f50","original_commit_id":"adc6c98c2daadd6c5169b3a1735a678e11838f50","user":{"login":"balldir","id":1971989,"avatar_url":"https://avatars.githubusercontent.com/u/1971989?v=3","gravatar_id":"","url":"https://api.github.com/users/balldir","html_url":"https://github.com/balldir","followers_url":"https://api.github.com/users/balldir/followers","following_url":"https://api.github.com/users/balldir/following{/other_user}","gists_url":"https://api.github.com/users/balldir/gists{/gist_id}","starred_url":"https://api.github.com/users/balldir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balldir/subscriptions","organizations_url":"https://api.github.com/users/balldir/orgs","repos_url":"https://api.github.com/users/balldir/repos","events_url":"https://api.github.com/users/balldir/events{/privacy}","received_events_url":"https://api.github.com/users/balldir/received_events","type":"User","site_admin":false},"body":"What is the purpose of quotation here ?","created_at":"2016-06-24T10:45:03Z","updated_at":"2016-06-24T10:45:03Z","html_url":"https://github.com/kaaproject/kaa/pull/764#discussion_r68382136","pull_request_url":"https://api.github.com/repos/kaaproject/kaa/pulls/764","_links":{"self":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/comments/68382136"},"html":{"href":"https://github.com/kaaproject/kaa/pull/764#discussion_r68382136"},"pull_request":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/764"}}},"pull_request":{"url":"https://api.github.com/repos/kaaproject/kaa/pulls/764","id":74060936,"html_url":"https://github.com/kaaproject/kaa/pull/764","diff_url":"https://github.com/kaaproject/kaa/pull/764.diff","patch_url":"https://github.com/kaaproject/kaa/pull/764.patch","issue_url":"https://api.github.com/repos/kaaproject/kaa/issues/764","number":764,"state":"open","locked":false,"title":"KAA-1167 Add a page on notifications","user":{"login":"Kirill380","id":6154009,"avatar_url":"https://avatars.githubusercontent.com/u/6154009?v=3","gravatar_id":"","url":"https://api.github.com/users/Kirill380","html_url":"https://github.com/Kirill380","followers_url":"https://api.github.com/users/Kirill380/followers","following_url":"https://api.github.com/users/Kirill380/following{/other_user}","gists_url":"https://api.github.com/users/Kirill380/gists{/gist_id}","starred_url":"https://api.github.com/users/Kirill380/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kirill380/subscriptions","organizations_url":"https://api.github.com/users/Kirill380/orgs","repos_url":"https://api.github.com/users/Kirill380/repos","events_url":"https://api.github.com/users/Kirill380/events{/privacy}","received_events_url":"https://api.github.com/users/Kirill380/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-16T10:59:46Z","updated_at":"2016-06-24T10:45:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fca1bc7be4c331558314a6866221966ec6def2fc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kaaproject/kaa/pulls/764/commits","review_comments_url":"https://api.github.com/repos/kaaproject/kaa/pulls/764/comments","review_comment_url":"https://api.github.com/repos/kaaproject/kaa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaaproject/kaa/issues/764/comments","statuses_url":"https://api.github.com/repos/kaaproject/kaa/statuses/adc6c98c2daadd6c5169b3a1735a678e11838f50","head":{"label":"Kirill380:feature/KAA-1167","ref":"feature/KAA-1167","sha":"adc6c98c2daadd6c5169b3a1735a678e11838f50","user":{"login":"Kirill380","id":6154009,"avatar_url":"https://avatars.githubusercontent.com/u/6154009?v=3","gravatar_id":"","url":"https://api.github.com/users/Kirill380","html_url":"https://github.com/Kirill380","followers_url":"https://api.github.com/users/Kirill380/followers","following_url":"https://api.github.com/users/Kirill380/following{/other_user}","gists_url":"https://api.github.com/users/Kirill380/gists{/gist_id}","starred_url":"https://api.github.com/users/Kirill380/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kirill380/subscriptions","organizations_url":"https://api.github.com/users/Kirill380/orgs","repos_url":"https://api.github.com/users/Kirill380/repos","events_url":"https://api.github.com/users/Kirill380/events{/privacy}","received_events_url":"https://api.github.com/users/Kirill380/received_events","type":"User","site_admin":false},"repo":{"id":58935242,"name":"kaa","full_name":"Kirill380/kaa","owner":{"login":"Kirill380","id":6154009,"avatar_url":"https://avatars.githubusercontent.com/u/6154009?v=3","gravatar_id":"","url":"https://api.github.com/users/Kirill380","html_url":"https://github.com/Kirill380","followers_url":"https://api.github.com/users/Kirill380/followers","following_url":"https://api.github.com/users/Kirill380/following{/other_user}","gists_url":"https://api.github.com/users/Kirill380/gists{/gist_id}","starred_url":"https://api.github.com/users/Kirill380/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kirill380/subscriptions","organizations_url":"https://api.github.com/users/Kirill380/orgs","repos_url":"https://api.github.com/users/Kirill380/repos","events_url":"https://api.github.com/users/Kirill380/events{/privacy}","received_events_url":"https://api.github.com/users/Kirill380/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Kirill380/kaa","description":"Kaa open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything.","fork":true,"url":"https://api.github.com/repos/Kirill380/kaa","forks_url":"https://api.github.com/repos/Kirill380/kaa/forks","keys_url":"https://api.github.com/repos/Kirill380/kaa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kirill380/kaa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kirill380/kaa/teams","hooks_url":"https://api.github.com/repos/Kirill380/kaa/hooks","issue_events_url":"https://api.github.com/repos/Kirill380/kaa/issues/events{/number}","events_url":"https://api.github.com/repos/Kirill380/kaa/events","assignees_url":"https://api.github.com/repos/Kirill380/kaa/assignees{/user}","branches_url":"https://api.github.com/repos/Kirill380/kaa/branches{/branch}","tags_url":"https://api.github.com/repos/Kirill380/kaa/tags","blobs_url":"https://api.github.com/repos/Kirill380/kaa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kirill380/kaa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kirill380/kaa/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kirill380/kaa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kirill380/kaa/statuses/{sha}","languages_url":"https://api.github.com/repos/Kirill380/kaa/languages","stargazers_url":"https://api.github.com/repos/Kirill380/kaa/stargazers","contributors_url":"https://api.github.com/repos/Kirill380/kaa/contributors","subscribers_url":"https://api.github.com/repos/Kirill380/kaa/subscribers","subscription_url":"https://api.github.com/repos/Kirill380/kaa/subscription","commits_url":"https://api.github.com/repos/Kirill380/kaa/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kirill380/kaa/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kirill380/kaa/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kirill380/kaa/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kirill380/kaa/contents/{+path}","compare_url":"https://api.github.com/repos/Kirill380/kaa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kirill380/kaa/merges","archive_url":"https://api.github.com/repos/Kirill380/kaa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kirill380/kaa/downloads","issues_url":"https://api.github.com/repos/Kirill380/kaa/issues{/number}","pulls_url":"https://api.github.com/repos/Kirill380/kaa/pulls{/number}","milestones_url":"https://api.github.com/repos/Kirill380/kaa/milestones{/number}","notifications_url":"https://api.github.com/repos/Kirill380/kaa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kirill380/kaa/labels{/name}","releases_url":"https://api.github.com/repos/Kirill380/kaa/releases{/id}","deployments_url":"https://api.github.com/repos/Kirill380/kaa/deployments","created_at":"2016-05-16T13:39:17Z","updated_at":"2016-05-16T13:39:27Z","pushed_at":"2016-06-23T14:42:10Z","git_url":"git://github.com/Kirill380/kaa.git","ssh_url":"git@github.com:Kirill380/kaa.git","clone_url":"https://github.com/Kirill380/kaa.git","svn_url":"https://github.com/Kirill380/kaa","homepage":"http://www.kaaproject.org","size":131944,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kaaproject:develop","ref":"develop","sha":"e308a9a273d831ff7612954579719b985cba5128","user":{"login":"kaaproject","id":6984613,"avatar_url":"https://avatars.githubusercontent.com/u/6984613?v=3","gravatar_id":"","url":"https://api.github.com/users/kaaproject","html_url":"https://github.com/kaaproject","followers_url":"https://api.github.com/users/kaaproject/followers","following_url":"https://api.github.com/users/kaaproject/following{/other_user}","gists_url":"https://api.github.com/users/kaaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kaaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaaproject/subscriptions","organizations_url":"https://api.github.com/users/kaaproject/orgs","repos_url":"https://api.github.com/users/kaaproject/repos","events_url":"https://api.github.com/users/kaaproject/events{/privacy}","received_events_url":"https://api.github.com/users/kaaproject/received_events","type":"Organization","site_admin":false},"repo":{"id":17839346,"name":"kaa","full_name":"kaaproject/kaa","owner":{"login":"kaaproject","id":6984613,"avatar_url":"https://avatars.githubusercontent.com/u/6984613?v=3","gravatar_id":"","url":"https://api.github.com/users/kaaproject","html_url":"https://github.com/kaaproject","followers_url":"https://api.github.com/users/kaaproject/followers","following_url":"https://api.github.com/users/kaaproject/following{/other_user}","gists_url":"https://api.github.com/users/kaaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kaaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaaproject/subscriptions","organizations_url":"https://api.github.com/users/kaaproject/orgs","repos_url":"https://api.github.com/users/kaaproject/repos","events_url":"https://api.github.com/users/kaaproject/events{/privacy}","received_events_url":"https://api.github.com/users/kaaproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaaproject/kaa","description":"Kaa open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything.","fork":false,"url":"https://api.github.com/repos/kaaproject/kaa","forks_url":"https://api.github.com/repos/kaaproject/kaa/forks","keys_url":"https://api.github.com/repos/kaaproject/kaa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaaproject/kaa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaaproject/kaa/teams","hooks_url":"https://api.github.com/repos/kaaproject/kaa/hooks","issue_events_url":"https://api.github.com/repos/kaaproject/kaa/issues/events{/number}","events_url":"https://api.github.com/repos/kaaproject/kaa/events","assignees_url":"https://api.github.com/repos/kaaproject/kaa/assignees{/user}","branches_url":"https://api.github.com/repos/kaaproject/kaa/branches{/branch}","tags_url":"https://api.github.com/repos/kaaproject/kaa/tags","blobs_url":"https://api.github.com/repos/kaaproject/kaa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaaproject/kaa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaaproject/kaa/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaaproject/kaa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaaproject/kaa/statuses/{sha}","languages_url":"https://api.github.com/repos/kaaproject/kaa/languages","stargazers_url":"https://api.github.com/repos/kaaproject/kaa/stargazers","contributors_url":"https://api.github.com/repos/kaaproject/kaa/contributors","subscribers_url":"https://api.github.com/repos/kaaproject/kaa/subscribers","subscription_url":"https://api.github.com/repos/kaaproject/kaa/subscription","commits_url":"https://api.github.com/repos/kaaproject/kaa/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaaproject/kaa/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaaproject/kaa/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaaproject/kaa/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaaproject/kaa/contents/{+path}","compare_url":"https://api.github.com/repos/kaaproject/kaa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaaproject/kaa/merges","archive_url":"https://api.github.com/repos/kaaproject/kaa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaaproject/kaa/downloads","issues_url":"https://api.github.com/repos/kaaproject/kaa/issues{/number}","pulls_url":"https://api.github.com/repos/kaaproject/kaa/pulls{/number}","milestones_url":"https://api.github.com/repos/kaaproject/kaa/milestones{/number}","notifications_url":"https://api.github.com/repos/kaaproject/kaa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaaproject/kaa/labels{/name}","releases_url":"https://api.github.com/repos/kaaproject/kaa/releases{/id}","deployments_url":"https://api.github.com/repos/kaaproject/kaa/deployments","created_at":"2014-03-17T18:48:31Z","updated_at":"2016-06-23T18:48:06Z","pushed_at":"2016-06-24T10:23:39Z","git_url":"git://github.com/kaaproject/kaa.git","ssh_url":"git@github.com:kaaproject/kaa.git","clone_url":"https://github.com/kaaproject/kaa.git","svn_url":"https://github.com/kaaproject/kaa","homepage":"http://www.kaaproject.org","size":144710,"stargazers_count":301,"watchers_count":301,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":117,"mirror_url":null,"open_issues_count":18,"forks":117,"open_issues":18,"watchers":301,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/764"},"html":{"href":"https://github.com/kaaproject/kaa/pull/764"},"issue":{"href":"https://api.github.com/repos/kaaproject/kaa/issues/764"},"comments":{"href":"https://api.github.com/repos/kaaproject/kaa/issues/764/comments"},"review_comments":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/764/comments"},"review_comment":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/764/commits"},"statuses":{"href":"https://api.github.com/repos/kaaproject/kaa/statuses/adc6c98c2daadd6c5169b3a1735a678e11838f50"}}}}
{"actor":{"display_login":"balldir"}}