Re:Finite state machines with Akka
by je42 on Saturday May 14, 2016 @07:49AM
(#11695685)
What about Kafka's at-least-once semantics ?
Is that being dealt with ?
[ Parent
| on HN ]
Re:Finite state machines with Akka
by felipefzdz on Saturday May 14, 2016 @02:34PM
(#11697449)
Disclaimer: 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)
Re:Finite state machines with Akka
by BrandonBradley on Saturday May 14, 2016 @11:01AM
(#11696405)
Your question is hard to understand.
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.
GP 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?