3 ms·
What about Kafka's at-least-once semantics ? Is that being dealt with ?
by je42 10y ago
What about Kafka's at-least-once semantics ?
Is that being dealt with ?
- BrandonBradley 10y agoYour question is hard to understand. https://kafka.apache.org/08/design.html https://kafka.apache.org/08/design.html "So effectively Kafka guarantees at-least-once delivery by default ...." Edit: Downvote if you want. I was trying to help you.
- biot 10y agoGP asked how this system deals with Kafka's at least once semantics. Pointing out that Kafka has at least once semantics is redundant. What GP was asking: what happens if Kafka delivers the "item added" event twice, but the "item deleted" event only once? Do you end up with an invalid/unrecoverable state?
- felipefzdz 10y agoDisclaimer: I'm the author of the post. In this particular example, both events (item_reported and item_deleted) end up in destructive actions identified by unique id. That idempotency makes safe working with Kafka's at-least-once semantics. You can see that it's safe to execute several times this line of code: val newItemsToBeDeleted = items.filterNot(_ == item)