The API doc is here:http://kafka-python.readthedocs.org/en/latest/apidoc/kafka.consumer.html
But when I run the following code, the exception is %d format: a number is required, not NoneType
client = KafkaClient("localhost:9092")
consumer = SimpleConsumer(client, "test-group", "test")
consumer.seek(0, whence=None)# (0,2) and (0,0)
run = True
while( run ):
message = consumer.get_message(block=False, timeout=4000)
except Exception as e:
print "Exception while trying to read msg:", str(e)
When I used the following piece of code, the exception is seek() got an unexpected keyword argument 'partition'
consumer.seek(0, whence=None, partition=None)# (0,2) and (0,0)
Any idea? Thanks.