question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature] Multi topics and partitions commit

See original GitHub issue

In 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:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
webmakerstevecommented, Feb 12, 2018

Support added with #351

1reaction
webmakerstevecommented, Feb 11, 2018

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found