You typically do have a single consumer per partition (in a single consumer group — so in the group of consumers jointly working on some task). However, you need first to get “related” events into the same partition — that’s where a Partitioner comes in.

So if you have 10 partitions, and you’d like all events relating to user with id 42 being written in the same partition, your partitioner would probably somehow use the id to generate the partition number.

--

--

Software engineer, Functional Programming and Scala enthusiast, SoftwareMill co-founder

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Warski

Adam Warski

Software engineer, Functional Programming and Scala enthusiast, SoftwareMill co-founder

More from Medium

We always had questions about who we are, what we want in life, but we all are many things.

The Green Truth

Unnecessary Exams