Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consuming messages from each partition separately #1063

Open
everhardt opened this issue Dec 13, 2023 · 2 comments · May be fixed by #1101
Open

Consuming messages from each partition separately #1063

everhardt opened this issue Dec 13, 2023 · 2 comments · May be fixed by #1101

Comments

@everhardt
Copy link

A Consumer that is subscribed to multiple partitions cannot control the mix of messages it consumes from each partition.
There are various reasons why controlling that is relevant, see eg. #719 and https://github.com/confluentinc/librdkafka/wiki/FAQ#what-are-partition-queues-and-why-are-some-partitions-slower-than-others.

That last link shows that librdkafka supports consuming from each partition separately. It would be great if that implementation is available in node-rdkafka as well. An example could be a PartitionConsumer class, that does not have the normal .consume methods, but .consume(topic, partition, number, callback).

@martijnimhoff
Copy link
Contributor

We're working on a PR: withthegrid#2

@pveller
Copy link

pveller commented May 1, 2024

re: #719 . node-rdkafka would probably need to migrate to using rd_kafka_queue_new / rd_kafka_consume_queue. You can't do better if you are on rd_kafka_consume

https://github.com/confluentinc/librdkafka/wiki/Consuming-from-multiple-topics-partitions-from-a-single-thread

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