summaryrefslogtreecommitdiff
path: root/kafka/consumer/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'kafka/consumer/base.py')
-rw-r--r--kafka/consumer/base.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/kafka/consumer/base.py b/kafka/consumer/base.py
index 0800327..25c01a1 100644
--- a/kafka/consumer/base.py
+++ b/kafka/consumer/base.py
@@ -83,6 +83,14 @@ class Consumer(object):
self._cleanup_func = cleanup
atexit.register(cleanup, self)
+ self.partition_info = False # Do not return partition info in msgs
+
+ def provide_partition_info(self):
+ """
+ Indicates that partition info must be returned by the consumer
+ """
+ self.partition_info = True
+
def fetch_last_known_offsets(self, partitions=None):
if self.group is None:
raise ValueError('KafkaClient.group must not be None')