Get the latest tech news

Estimating Pi with Kafka streams


Recently I wanted to learn a bit about Apache Kafka. It is often used as a way to do event sourcing (or similar message-driven architectures). An “add-on” to...

The FractionAggregator class is just a simple Java record that keeps track of the total number of messages consumed, and how many landed inside the circle. I was a bit surprised that I wouldn’t see the message immediately, but when meditating on this for a little while, I realized that there is a difference between latecy and throughput. In a real application one would rather use a serialization method that don’t crash on schema changes (Protobuf, Avro, JSON, …).

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Kafka

Kafka

Photo of Kafka streams

Kafka streams

Related news:

News photo

Tiered storage won't fix Kafka