Reputation: 213
I've noticed that passing calling Consumer.commit(msg=None)
is a valid case. At least it's being handled in the library's code separately. I'm wondering what's the difference between doing that and calling Consumer.commit
with the last read message for the "msg" argument.
It looks like it does pretty much the same thing, but then why the argument is always passed explicitly in all of the tests in examples/integration_test.py
?
Upvotes: 2
Views: 4024
Reputation: 213
https://github.com/confluentinc/confluent-kafka-python/issues/277
Answered by Magnus Edenhill:
The argument-less commit() will commit all uncommitted offsets for the current assignment.
The Python integration tests are primarily to verify the APIs with a live broker environment, the actual kafka client tests reside in librdkafka's build tree and are much more detailed. librdkafka (using this Python client) also runs the full standard Apache Kafka client system test suite in a nightly job.
Upvotes: 2