Problem with quarkus kafka smallrye consumer multithreading
See original GitHub issueDescribe the bug
By setting “partitions” parameter to 3. I have 3 different consumer ids, but the messages are processed sequentially.
- quarkus version 2.X
- smallrye
Properties that i set
mp:
messaging:
incoming:
event:
connector: smallrye-kafka
auto:
offset:
reset: earliest
topic: MY_TOPIC
group:
id: my-group
partitions: 3
Expected behavior
the messages should be processed concurrently for each partition
Actual behavior
the messages are processed sequentialy though we have different partitions
Output of java -version
jdk11
Quarkus version or git rev
2.4.1
Build tool (ie. output of mvnw --version
or gradlew --version
)
3.6.3
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:23 (6 by maintainers)
Top Results From Across the Web
Problem with quarkus kafka smallrye consumer multithreading
I set this properties but, quarkus doesn't work correctly. smallrye; kafka have 3 partitions. mp: messaging: incoming: event: connector: ...
Read more >Apache Kafka Reference Guide - Quarkus
Quarkus provides support for Apache Kafka through SmallRye Reactive Messaging framework. ... Multiple consumer threads inside a consumer group.
Read more >Apache Kafka - SmallRye Reactive Messaging
The Kafka Producer is thread safe and may be used from multiple threads, so SmallRye Reactive Messaging exposes it directly. The Kafka Consumer...
Read more >Quarkus — Subatomic Java Review: Apache Kafka Producer ...
In this article, we will develop consumer and producer applications for Apache Kafka using Quarkus Framework and create native images.
Read more >Getting Started to Quarkus Reactive Messaging with Apache ...
Quarkus uses the SmallRye Reactive Messaging project to interact with ... (smallrye-kafka-consumer-thread-0) SRMSG18257: Kafka consumer ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Another solution is something like:
Note that even with this, the emission will still be serialized. They would be multi-threaded, but serialized. You may want to do something like:
so, the processing is running on the different threads.
You can try with the low-level kafka client, but it’s a rabbit hole.
No, the documentation is right, it just does not do the dispatching as you describe it, and will still serialize the records following the reactive streams semantic.