Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: