diff options
author | Mahendra M <mahendra.m@gmail.com> | 2013-05-27 13:42:47 +0530 |
---|---|---|
committer | David Arthur <mumrah@gmail.com> | 2013-05-29 16:29:01 -0400 |
commit | a8e423c7e7aa861b2476ed760dada26a024fdacf (patch) | |
tree | 6e305f11f1febd97f35e869e8b30425a9925f220 /test | |
parent | 222ef82983fae6c9d9277bc3806bc7e8bbe39dbf (diff) | |
download | kafka-python-a8e423c7e7aa861b2476ed760dada26a024fdacf.tar.gz |
Minor bug fixes
* When you initiate a producer with a non-existant queue, the queue is
created. However this partition info is not reflected in KafkaClient()
immediately. So, we wait for a second and try loading it again.
Without this fix, if we do producer.send_messages() after creating a new
queue, the library will throw a StopIteration exception.
* In SimpleConsumer(), the defaults are not as mentioned in the comments.
Fix this (or do we change the documentation?)
* There was a problem with the way the consumer iterator worked.
for eg: assume that there were 10 messages in the queue/topic
and you iterate over it as -
for msg in consumer:
print (msg)
At the end of this, 'offset' that is saved is 10.
So, if you run the above loop again, the last message (10) is repeated.
This can be fixed by adjusting the offset counter before fetching
the message
* Avoid some code repeat in consumer.commit()
* Fix a bug in send_offset_commit_request() invocation in consumer.py
* Fix missing imports
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions