forked from eclipse-ditto/ditto
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[eclipse-ditto#964] added documentation about announcements in genera…
…l and the specifically added "subjectDeletion" announcement Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
- Loading branch information
Showing
13 changed files
with
180 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
documentation/src/main/resources/jsonschema/protocol-announcement.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"description": "An Ditto Protocol announcement announces an event before it actually happens.", | ||
"title": "Ditto Protocol announcement", | ||
"properties": { | ||
"topic": { | ||
"type": "string", | ||
"description": "Contains the topic of the announcement, ending with the announcement name." | ||
}, | ||
"headers": { | ||
"type": "object", | ||
"description": "Additional headers." | ||
}, | ||
"path": { | ||
"type": "string", | ||
"description": "The path is always the empty path `/` for an announcement." | ||
}, | ||
"value": { | ||
"type": ["object","string","number","array","boolean"], | ||
"description": "The _value_ field contains the optional payload of the announcement." | ||
} | ||
}, | ||
"required": [ "topic", "headers", "path" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
documentation/src/main/resources/pages/ditto/basic-signals-announcement.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Announcement | ||
keywords: announcement, signal | ||
tags: [signal] | ||
permalink: basic-signals-announcement.html | ||
--- | ||
|
||
Announcements are special signals which are published in order to announce something before it actually happens. | ||
For example, before an [event](basic-signals-event.html) is created and published, an announcement could signal that | ||
the event will happen soon. | ||
|
||
Announcements have the following characteristics: | ||
* they are **not** persisted/appended into any data store | ||
* they are published to interested and authorized parties via the [WebSocket API](httpapi-protocol-bindings-websocket.html) as | ||
well as [connection targets](basic-connections.html#targets) via [change notifications](basic-changenotifications.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
.../src/main/resources/pages/ditto/protocol-specification-policies-announcement.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: Policies - Announcement protocol specification | ||
keywords: protocol, specification, announcement, policy | ||
tags: [protocol] | ||
permalink: protocol-specification-policies-announcement.html | ||
--- | ||
|
||
{% include note.html content="The *topic path* of policy commands contains no *channel* element. | ||
See the [specification](protocol-specification-policies.html#ditto-protocol-topic-structure-for-policies) for details. " %} | ||
|
||
## Policy announcements | ||
|
||
A Policy announcement contains the announcement name as last part of the topic: | ||
``` | ||
<namespace>/<policyName>/policies/announcements/<announcement-name> | ||
``` | ||
|
||
The Ditto Protocol representation of an `Announcement` is specified as follows: | ||
|
||
{% include docson.html schema="jsonschema/protocol-announcement.json" %} | ||
|
||
The following Policy announcements are currently supported: | ||
|
||
### SubjectDeletionAnnouncement | ||
|
||
Announcement indicating that some subjects of a policy are deleted or about to be deleted soon. | ||
|
||
| Field | Value | | ||
|-----------|-------------------------| | ||
| **topic** | `<namespace>/<policyName>/policies/announcements/subjectDeletion` | | ||
| **path** | `/` | | ||
| **value** | `JsonObject` containing<br/>* `deletedAt` timestamp (as ISO-8601 `string`)<br/>* `subjectIds` of policy [subjects](basic-policy.html#subjects) which will soon be deleted (`JsonArray` of subjects `string`s)| | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.