Skip to content

How far ahead in a partition KEY order settings would go to look for different KEY #829

Answered by rkolesnev
yogeshwarpst asked this question in General
Discussion options

You must be logged in to vote

Hi @yogeshwarpst - so the way it works - Parallel Consumer consumes messages from partition in offset order into the buffer - then the messages from the buffer are parallelised by key - so you are still limited by how much it can read into memory from Kafka before reaching the buffer limit and pausing consumption to prevent OOM.
If the messages are small and you have enough RAM - you can increase buffer size to be really large (1M of 1KB messages is 1GB, with overheads - a bit more but still within reason) - so even taking into account object serialization / copies - on something like 8GB or 16GB VM - you can try to set buffer to 1 - 2M messages and give it shot.
Of course first validate …

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by yogeshwarpst
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rkolesnev
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants