[feature] Multi topics and partitions commit
See original GitHub issueIn order to prevent messages lost. I’m reimplementing the offset commit logic on userland (I commit only once the messages are processed, not received).
I’m using the 'enable.auto.commit': false
global option to disable the “auto commit”. I’m also batching the commit of the offsets evert X messages or Y seconds. In order to do so, I call the async consumer.commit()
API multiple times (one time per (topic, partition) tuple).
I have noticed that the “auto commit” logic commit on different topics and partitions at the same time. I was looking into using such API instead of calling consumer.commit()
X times. It would be more efficient.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
How to Choose the Number of Topics/Partitions in a Kafka ...
The first thing to understand is that a topic partition is the unit of parallelism in Kafka. On both the producer and the...
Read more >Best practices and strategies for Kafka topic partitioning
A partition in Kafka is the storage unit that allows for a topic log to be separated into multiple logs and distributed over...
Read more >Kafka - When to commit? - Quarkus
Topics are divided into partitions. Each partition is an ordered, immutable sequence of records. Sending a message to a topic appends it to...
Read more >Apache Kafka Series [Part 2]: Partitions, Consumer Group and ...
When a consumer in a group receives messages from the partitions assigned by the coordinator, it must commit the offsets corresponding to the ......
Read more >Retrieve data from same partitions across multiple topics
Partition assignment will not be consistent across multiple topics unless you manually assign them to the consumers.
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
Support added with #351
Well, it isn’t a 1:1 request-per-call necessarily, so we can definitely get more performance out of commits.
https://github.com/edenhill/librdkafka/blob/master/src-cpp/rdkafkacpp.h#L1685
There is a method I can bind to that will take an array so I will go ahead implementing that. Shouldn’t be too long and it will make it in the next release!