Skip to content

Commit

Permalink
Tighten up the text
Browse files Browse the repository at this point in the history
  • Loading branch information
alanconway committed Apr 17, 2019
1 parent a951c44 commit 6552d0c
Showing 1 changed file with 34 additions and 40 deletions.
74 changes: 34 additions & 40 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,32 +186,29 @@ within the same JSON object.
- MUST be a non-empty string

### source
* Type: `URI-reference`
* Description: Identifies the event producer. Often this will include
- Type: `URI-reference`
- Description: Identifies the event producer. Often this will include
information such as the type of the event source, the organization
publishing the event, the process that produced the event, and some
unique identifiers. The syntax of `source` is not defined by this
specification.
publishing the event, the process that produced the event, and some unique
identifiers. The exact syntax and semantics behind the data encoded in the URI
is event producer defined.

An application MUST assign a distinct `source` to each distinct producer.
The application MAY use UUIDs, URNs, DNS authorities or an application-specific
scheme to create unique identifiers.

In an application with many producers, each producer MUST be
assigned a distinct `source`. This specification does not define how
to ensure uniqueness. Since `source` is a URI-reference, it allows
for standard formats using DNS authorities or UUIDs, as well as
application-specific string or path identifiers.

* Constraints:
* REQUIRED

* Examples
* Internet-unique URI with a DNS authority.
* https://github.com/cloudevents/spec/pull/123
* mailto:cncf-wg-serverless@lists.cncf.io
* Universally-unique URN with a UUID:
* urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66
* Application-specific path or string identifiers
* /cloudevents/spec/pull/123
* /sensors/tn-1234567/alerts
* 1-555-123-4567
- Constraints:
- REQUIRED
- Examples
- Internet-wide unique URI with a DNS authority.
- https://github.com/cloudevents/spec/pull/123
- mailto:cncf-wg-serverless@lists.cncf.io
- Universally-unique URN with a UUID:
- urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66
- Application-specific identifiers
- /cloudevents/spec/pull/123
- /sensors/tn-1234567/alerts
- 1-555-123-4567

### subject
- Type: `String`
Expand Down Expand Up @@ -242,22 +239,19 @@ within the same JSON object.
- `subject`: mynewfile.jpg

### id
* Type: `String`
* Description: Identifies the event, enables de-duplication. The
format of this string is determined by the producer. Each producer
MUST generate unique `id` values for its own events, `id` values
from different producers might clash. Consumers MAY assume that
events with identical `id` and `source` values are duplicates, and
MAY discard all but one of such duplicate events.
* Examples:
* An event counter maintained by the producer
* A database commit ID
* Constraints:
* REQUIRED
* MUST be a non-empty string
* The producer MUST provide a different `id` for each distinct event it produces.
* If a duplicate of a previous event is re-sent due to a failure, it
MAY have the same `id`.

- Type: `String`
- Description: Identifies the event for de-duplication.
Producers MUST ensure that each distinct event from the same `source` has a unique `id` If a duplicate event is re-sent due to a network error, it MAY have the same `id`.
.
Consumers MAY assume that Events with identical `source` and `id` are duplicates.
- Examples:
- An event counter maintained by the producer
- A database commit ID
- A UUID
- Constraints:
- REQUIRED
- MUST be a non-empty string

### time

Expand Down

0 comments on commit 6552d0c

Please sign in to comment.