From e545401e9b21b73b1959cdf62ec11ca5f9bdabeb Mon Sep 17 00:00:00 2001 From: Jan Klasser <52920852+JanKlasser3000@users.noreply.github.com> Date: Mon, 7 Oct 2024 08:32:46 +0200 Subject: [PATCH] feat(guidelines): add new rule for sending durable event ids (#77) --- ...are-consumers-to-consume-events-idempotently.md | 1 + .../rules/should-send-durable-event-ids.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 api-guidelines/async/semantics/event-structure/rules/should-send-durable-event-ids.md diff --git a/api-guidelines/async/semantics/event-structure/rules/must-prepare-consumers-to-consume-events-idempotently.md b/api-guidelines/async/semantics/event-structure/rules/must-prepare-consumers-to-consume-events-idempotently.md index 1571b18a..1b22d5a1 100644 --- a/api-guidelines/async/semantics/event-structure/rules/must-prepare-consumers-to-consume-events-idempotently.md +++ b/api-guidelines/async/semantics/event-structure/rules/must-prepare-consumers-to-consume-events-idempotently.md @@ -40,6 +40,7 @@ As these requirements impose quite a restriction on the producer, a separate [`s ::: references - [MAY provide `sequence` context attribute](../../../format/cloudevents/rules/may-provide-sequence-context-attribute.md) +- [SHOULD send durable event IDs ](should-send-durable-event-ids.md) - [You cannot have exactly-once delivery](https://bravenewgeek.com/you-cannot-have-exactly-once-delivery/) - [Exactly-Once Semantics Are Possible: Here’s How Kafka Does It](https://www.confluent.io/de-de/blog/exactly-once-semantics-are-possible-heres-how-apache-kafka-does-it/) - [Processing guarantees in kafka](https://medium.com/@andy.bryant/processing-guarantees-in-kafka-12dd2e30be0e) diff --git a/api-guidelines/async/semantics/event-structure/rules/should-send-durable-event-ids.md b/api-guidelines/async/semantics/event-structure/rules/should-send-durable-event-ids.md new file mode 100644 index 00000000..5a231d67 --- /dev/null +++ b/api-guidelines/async/semantics/event-structure/rules/should-send-durable-event-ids.md @@ -0,0 +1,14 @@ +--- +id: R000058 +--- + +# SHOULD send durable event IDs + +An event is a message that contains information about something factual that occurred in the past. +Each event must have an ID that identifies the event. +The event ID should be the same for retries or when sending via multiple channels. Consumers should assume that events with an identical source and ID are duplicates. + +::: references + +- [id message attribute in cloud event spec](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) + ::: \ No newline at end of file