aio-libs / aiokafka

asyncio client for kafka
http://aiokafka.readthedocs.io/
Apache License 2.0
1.08k stars 224 forks source link

Add client.rack configuration option to support consumer fetching from closest replica (KIP-392) #1016

Open trentbitterman opened 1 week ago

trentbitterman commented 1 week ago

Describe the solution you'd like

Currently, the AIOKafkaConsumer class has no way to set the client.rack consumer config supported by other clients. Adding and implementing this option would allow consumers to fetch from the nearest replica.

Additional context

More information can be found in KIP-392. This configuration value is supported by librdkafka and confluent-kafka-python, for example.