How to achieve concurrent processing of messages from different Kafka partitions on the same topic #36539
Unanswered
kirankolli-addepar
asked this question in
Q&A
Replies: 1 comment
-
/cc @alesj (kafka), @cescoffier (kafka), @ozangunalp (kafka) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Quarkus version = 2.16.5.Final
I am trying to achieve concurrent processing of messages that are in different partitions but same topic. I also want to have explicit control on the commit of each message and do not want to commit until the message has been processed. Since the messages are coming in different partitions based on the key I believe this should be easily achievable.
However what I am finding is that there is serial processing of messages and a message on a different partition is not picked up until the currently processing message is committed. Why is this and how do I resolve this ?
My code:
My properties are set as below :
As you can see from above I have set the partitions property to three and the worker pool size to three as well.
Also when I change the annotation of
@Blocking("worker-pool")
to@Blocking(value = "worker-pool", ordered = false)
what I find is that messages within the same partition are being consumed in a concurrent fashion i.e. skipping the order within the same partition, which is not what I want at all. I would like concurrent processing across partitions but that order within a partition be respected.Also posted to :
https://stackoverflow.com/questions/77311211/quarkus-how-to-achieve-concurrent-processing-of-messages-from-different-kafka
Beta Was this translation helpful? Give feedback.
All reactions