Apache Kafka is not for event sourcing

Click for: original source

Jesper Hammarbäck article in which he argues why Kafka is not the best tool for event sourcing. Kafka is a great tool for delivering messages between producers and consumers and the optional topic durability allows you to store your messages permanently. Forever if you’d like.

The Event Sourcing pattern defines an approach to handling operations on data that’s driven by a sequence of events, each of which is recorded in an append-only store. Application code sends a series of events that imperatively describe each action that has occurred on the data to the event store, where they’re persisted.

He argues that Kafka is a great tool for event store or an event log, but it really isn’t a suitable tool for event sourcing.

His arguments are around:

  • Loading current state - fast forwarding to current state is not easy in Kafka
  • Consistent writes

He concludes that Kafka might be a good complement to your event store as a way of transporting events to downstream query services or read models

To learn more, read this interesting article.

[Read More]

Tags software-architecture apache streaming big-data machine-learning