Skip to content

Kafka consume more than 1 message per time #184

Answered by BEagle1984
higor-correa asked this question in Q&A
Discussion options

You must be logged in to vote

With Kafka you will always only get one message after the other (per consumer).

Silverback creates "a thread" per each topic partition and tries to parallelize a bit, but the degree of parallelism greatly depends on the amount of messages you consume and how they are spread across the partitions.

I generally suggest to add more partitions if you need to parallelize more, but I'm talking like 12/15 anyway, not hundreds.

Another way to improve the performance is processing the messages in batches. You still consume sequentially but the commit will be batched and you can process multiple messages concurrently (if you want, if you build your parallelization logic). The idea is that you can fo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@higor-correa
Comment options

Answer selected by higor-correa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants