Add KafkaConsumer#close
This commit is contained in:
@@ -268,6 +268,10 @@ class KafkaConsumer(object):
|
|||||||
# Reset message iterator in case we were in the middle of one
|
# Reset message iterator in case we were in the middle of one
|
||||||
self._reset_message_iterator()
|
self._reset_message_iterator()
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
"""Close this consumer's underlying client."""
|
||||||
|
self._client.close()
|
||||||
|
|
||||||
def next(self):
|
def next(self):
|
||||||
"""Return the next available message
|
"""Return the next available message
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user