Skip to content

Commit

Permalink
Add event reply header to spec (#4560)
Browse files Browse the repository at this point in the history
* Add event reply header to spec

* Refactor wording

* Fix nits

* Use K-Eventing-Http-Attr instead

* Replace all the MUST with SHOULD

* Use prefer: callable as a hint to the sink for event reply support

* Use single prefer header instead of an array

* Use reply instead of callable
  • Loading branch information
Zhongduo Lin (Jimmy) authored Jan 15, 2021
1 parent 056bc25 commit 1c94ef8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/spec/data-plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,21 @@ delivered.
CloudEvents received by Sink MAY have
[Distributed Tracing Extension Attribute](https://github.com/cloudevents/spec/blob/v1.0/extensions/distributed-tracing.md).

### Event reply contract

An event sender supporting event replies SHOULD include a `Prefer: reply` header
in delivery requests to indicate to the sink that event reply is supported. An event
sender MAY ignore an event reply in the delivery response if the `Prefer: reply`
header was not included in the delivery request.

An example is that a Broker supporting event reply sends events with an additional header
`Prefer: reply` so that the sink connected to the Broker knows event replies will
be accepted. While a source sends events without the header, in which case the sink may
assume that any event reply will be dropped without error or retry attempt. If a sink
wishes to ensure the reply events will be delivered, it can check for the existence of
the `Prefer: reply` header in the delivery request and respond with an error code
if the header is not present.

### Data plane contract for Sources

See [Source Delivery specification](../spec/sources.md#source-event-delivery)
Expand Down

0 comments on commit 1c94ef8

Please sign in to comment.