Skip to content

Bug: aiokafka broker doesn't expose client_rack option #2868

@zueve

Description

@zueve

Describe the bug
Can't forward client_rack to aiokafka consumer through FastStream Kafka API.

How to reproduce
Include source code:

from faststream import FastStream

from faststream.kafka import KafkaBroker

# Attempt to configure at broker level

broker = KafkaBroker(
    "localhost:9092",
    client_rack="us-east-1a",  # not supported
)
app = FastStream(broker)

And/Or steps to reproduce the behaviour:

  1. Create a KafkaBroker.
  2. Try to pass client_rack to the broker constructor.
  3. Observe that the parameter is not accepted.
  4. There is no alternative way to configure it via subscriber(...) either.

Expected behavior
KafkaBroker should allow passing client_rack (or generic consumer kwargs) and forward it to the underlying aiokafka.AIOKafkaConsumer.

Observed behavior
client_rack is not supported in KafkaBroker constructor, nor in subscriber configuration, so it cannot be passed to aiokafka.

Screenshots
N/A.

Environment
Running FastStream 0.6.7 with CPython 3.14.5 on Linux

Additional context
aiokafka.AIOKafkaConsumer supports client_rack since 0.14.0 version

Metadata

Metadata

Assignees

No one assigned

    Labels

    AioKafkaIssues related to `faststream.kafka` modulebugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions