RHCLOUD-47238 Add Events and change notifications documentation#98
RHCLOUD-47238 Add Events and change notifications documentation#98josejulio wants to merge 2 commits into
Conversation
Document Kessel's event system as CloudEvents 1.0 published to event topics. Explains what events are published (resource and relationship), event format, delivery guarantees (exactly-once, durability, ordering), and how events relate to the consistency model. Written as pure Diataxis explanation focused on understanding the event system, not how to consume events (reserved for how-to guides). All technical claims verified against source code (inventory-api proto definitions, outbox implementation). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
I think the agent(s) got confused here because our eventing has changed and the old patterns were not fully removed. Using the CloudEvents spec was an artifact of the old eventing system. I looked at the current inventory-api source and our outbox events don't actually use or conform to CloudEvents 1.0. There's no CloudEvents SDK in go.mod, the |
|
|
||
| Kessel guarantees reliable event delivery with the following semantics: | ||
|
|
||
| **Exactly-once per write operation** — Each `ReportResource` or `DeleteResource` operation produces events atomically (one resource event and one relationship event). If the write succeeds, both events are guaranteed to be published. If the write fails, no events are published. |
There was a problem hiding this comment.
We are not technically exactly-once, we are at-least-once processing. The consumer uses manual offset commits with a modulo of 10 (commitModulo: 10 in options.go:36). If the consumer crashes between processing a message and committing, that message will be reprocessed. The AlreadyExists handling in CreateTuple (line 518) shows the system is designed to handle duplicates, which is an at-least-once pattern with idempotency.
Address review comments from PR project-kessel#98: - Remove CloudEvents 1.0 compliance claims - events are inspired by CloudEvents but not spec-compliant - Change delivery guarantee from exactly-once to at-least-once with idempotent processing guidance - Remove internal tuple events section - not relevant for external consumers - Simplify to focus only on resource events on outbox.event.kessel.resources topic - Fix event type pattern to explicit redhat.inventory.resources.{resource_type}.{operation} - Add partitioning mechanism details (resource ID as message key) - Improve delete event explanation with envelope metadata context Verified against inventory-api source code that tuple events are internal synchronization signals containing version metadata, not meant for external consumption. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Document Kessel's event system as CloudEvents 1.0 published to event topics. Explains what events are published (resource and relationship), event format, delivery guarantees (exactly-once, durability, ordering), and how events relate to the consistency model.
Written as pure Diataxis explanation focused on understanding the event system, not how to consume events (reserved for how-to guides).
All technical claims verified against source code (inventory-api proto definitions, outbox implementation).