confluent-kafka-python icon indicating copy to clipboard operation
confluent-kafka-python copied to clipboard

Docs Bug: `fetch.wait.max.ms` in consumer config but shows `fetch.max.wait.ms` in official docs

Open dingo4dev opened this issue 8 months ago • 2 comments

When I followed the consumer-config document and initial Consumer with additional config, following error occurred: No such configuration property: "fetch.max.wait.ms"

Image

[!NOTE] Rewrite to fetch.wait.max.ms and the error gone and the consumer successfully subscribe


Confluent Kafka Version

2.10.0

Reproduce

from confluent_kafka import Consumer

c = Consumer({
    'bootstrap.servers': 'localhost:9093',
    'group.id': 'confluent_kafka_test',
    'auto.offset.reset': 'earliest',
    'fetch.max.wait.ms': 1000,
})

c.subscribe(['test_topic'])
---------------------------------------------------------------------------
KafkaException                            Traceback (most recent call last)

         1 from confluent_kafka import Consumer
----> 3 c = Consumer({
         4     'bootstrap.servers': 'localhost:9093',
         5     'group.id': 'confluent_kafka_test',
         6     'auto.offset.reset': 'earliest',
         7     'fetch.max.wait.ms': 1000,
         8 })
        10 c.subscribe(['test_topic'])

KafkaException: KafkaError{code=_INVALID_ARG,val=-186,str="No such configuration property: "fetch.max.wait.ms""}

Are you willing to submit a PR?

  • [x] Yes I am willing to submit a PR!

dingo4dev avatar Jun 09 '25 08:06 dingo4dev

I think you have a typo of fetch.wait.max.ams instead of fetch.wait.max.ms in the exception message which doesn't match the code you posted above. Did you run this with uncommitted code that had an accidental typo there or a different version than you posted for the config?

MSeal avatar Jul 25 '25 00:07 MSeal

Oh my bad. Here is the updated repro code and exception. Will correct above message too.

from confluent_kafka import Consumer

c = Consumer({
    'bootstrap.servers': 'localhost:9093',
    'group.id': 'confluent_kafka_test',
    'auto.offset.reset': 'earliest',
    'fetch.max.wait.ms': 1000,
})

c.subscribe(['test_topic'])
---------------------------------------------------------------------------
KafkaException                            Traceback (most recent call last)
Cell In[11], [line 3]
         1 from confluent_kafka import Consumer
----> 3 c = Consumer({
         4     'bootstrap.servers': 'localhost:9093',
         5     'group.id': 'confluent_kafka_test',
         6     'auto.offset.reset': 'earliest',
         7     'fetch.max.wait.ms': 1000,
         8 })
        10 c.subscribe(['test_topic'])

KafkaException: KafkaError{code=_INVALID_ARG,val=-186,str="No such configuration property: "fetch.max.wait.ms""}

dingo4dev avatar Aug 25 '25 06:08 dingo4dev