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

assignment() returns empty list

Open dbus-prsm opened this issue 6 years ago • 8 comments

Description

After upgrading from 0.11.4 to 1.0.0 I noticed that assignment() has begun returning empty list. Am I missing something?

How to reproduce

Here is the simple script to reproduce:

from confluent_kafka import Consumer, version, libversion

conf = {'bootstrap.servers': 'XXX:9092',
        'group.id': 'test',
        'default.topic.config': {'auto.offset.reset': 'smallest'},
        }

print('confluent-kafka-python: %s, librdkafka: %s' % version(), libversion())
topic = 'test'

c = Consumer(**conf)
c.subscribe([topic])
m = c.poll(1)
print(c.assignment())

c.close()

Output:

confluent-kafka-python: 0.11.4, librdkafka: 721920 ('0.11.4', 722175)
[TopicPartition{topic=test,partition=0,offset=-1001,error=None}]

and

confluent-kafka-python: 1.0.0, librdkafka: 1048576 ('1.0.1', 16777727)
[]

Checklist

Please provide the following information:

  • [x] confluent-kafka-python and librdkafka version (confluent_kafka.version() and confluent_kafka.libversion()): 0.11.4/0.11.4 and 1.0.0/1.0.1
  • [x] Apache Kafka broker version: 2.2.0
  • [x] Client configuration: conf = {'bootstrap.servers': 'XXX:9092', 'group.id': 'test', 'default.topic.config': {'auto.offset.reset': 'smallest'},}
  • [x] Operating system: Debian GNU/Linux 9
  • [ ] Provide client logs (with 'debug': '..' as necessary)
  • [ ] Provide broker log excerpts
  • [ ] Critical issue

dbus-prsm avatar Jun 07 '19 02:06 dbus-prsm