Kafkajs: Support for KIP-392: Allow consumers to fetch from closest replica

Created on 28 Apr 2020  路  5Comments  路  Source: tulios/kafkajs

We are using kafkajs in production and recently upgraded our cluster to support Kafka 2.4, which include KIP-392 that supports consumers to fetch from replica instead of the leader. It looks like this feature is not supported by kafkajs yet. The latest fetch protocol implemented is 7, but the feature is supported in 11. I was wondering if there are any active initiatives around updating protocol support right now (or support for 2.4 in general)? And if not, would it be okay to directly create a PR introducing v11, or are there any dependencies that requires prior versions to be supported first? Thanks!

question

Most helpful comment

Small update here: We still find this quite relevant to have, so I'm now going to try to implement the missing pieces (protocol support, for a start). To make things easier to merge I'll try to create smaller PRs for each part.

All 5 comments

Hi @jgao54 my plan for the beginning of the year was to upgrade the protocols and potentially reach version 2; the idea was to finalize https://github.com/tulios/kafkajs/projects/2, but a lot of things happened, and I can promise on that timeline anymore.

would it be okay to directly create a PR introducing v11
The short answer is no. We would like to have the other versions.
The protocol was structured in a way that you can easily maintain a fork just adding the protocol version you want.

Of course, we would love to receive contributions implementing the other versions. We can support you on the way, and as we normalize our time we will get back to the protocol update.

Mostly for the record: We're also interested in this feature, and also willing to contribute time and resources to implementation of it.

Small update here: We still find this quite relevant to have, so I'm now going to try to implement the missing pieces (protocol support, for a start). To make things easier to merge I'll try to create smaller PRs for each part.

Took a while, but: https://github.com/tulios/kafkajs/pull/810 provides an implementation that works in my tests so far.

810 has landed, so I guess we can close this one?

Was this page helpful?
0 / 5 - 0 ratings