summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlysse Carion <ulysse@ulysse.io>2015-07-07 16:03:44 -0700
committerUlysse Carion <ulysse@ulysse.io>2015-07-07 16:03:44 -0700
commitb47736dc26c28bd5446f6d4020944a3cbce5d83f (patch)
treecbdc6dea0d0ac3047aa181d2107809d3ba150a8f
parentadbd4ac052e4a5b40cfc2a3589b7adbcb656afe5 (diff)
downloadkafka-python-b47736dc26c28bd5446f6d4020944a3cbce5d83f.tar.gz
Add KafkaConsumer#close
-rw-r--r--kafka/consumer/kafka.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/kafka/consumer/kafka.py b/kafka/consumer/kafka.py
index 11c4221..efe9105 100644
--- a/kafka/consumer/kafka.py
+++ b/kafka/consumer/kafka.py
@@ -268,6 +268,10 @@ class KafkaConsumer(object):
# Reset message iterator in case we were in the middle of one
self._reset_message_iterator()
+ def close(self):
+ """Close this consumer's underlying client."""
+ self._client.close()
+
def next(self):
"""Return the next available message