-
Notifications
You must be signed in to change notification settings - Fork 926
Closed
Labels
enhancementRequesting a feature changeRequesting a feature changequestionA question about how to use or about expected behavior of the libraryA question about how to use or about expected behavior of the library
Description
Seek fails unless a poll is done first:
from confluent_kafka import Consumer, KafkaError, TopicPartition
c = Consumer({
'bootstrap.servers': 'localhost',
'group.id': 'bob-group',
'default.topic.config': {
'auto.offset.reset': 'smallest',
}
})
c.subscribe(['topic-test'])
tp = TopicPartition('topic-test', 0, 10)
#msg = c.poll() #shouldn't be necessary think fault in client
c.seek(tp)
Results in:
Traceback (most recent call last):
File "kafka.confluent.consumer.py", line 29, in <module>
c.seek(tp)
cimpl.KafkaException: KafkaError{code=_UNKNOWN_PARTITION,val=-190,str="Failed to seek to offset 10: Local: Unknown partition"}
By uncommenting the line "msg = c.poll()", the seek will succeed.
System Info:
Ubuntu 16.04
confluent-kafka-0.11.4
kafka_2.11-1.1.0.tgz
zookeeperd 3.4.10-3 (installed via apt)
ksindi, hrchu, mkmoisen and hezengliang
Metadata
Metadata
Assignees
Labels
enhancementRequesting a feature changeRequesting a feature changequestionA question about how to use or about expected behavior of the libraryA question about how to use or about expected behavior of the library