diff options
author | Martin Olveyra <molveyra@gmail.com> | 2015-06-29 13:28:12 -0200 |
---|---|---|
committer | Martin Olveyra <molveyra@gmail.com> | 2015-06-29 13:28:12 -0200 |
commit | 43164ad096cf3dc9f252d0c6e4377ff025bb01f0 (patch) | |
tree | 72d31fe3c05b2a33c96b21d9068237154ae43523 /kafka/consumer/base.py | |
parent | adbd4ac052e4a5b40cfc2a3589b7adbcb656afe5 (diff) | |
download | kafka-python-43164ad096cf3dc9f252d0c6e4377ff025bb01f0.tar.gz |
allow to retrieve partition info in mp consumer
Diffstat (limited to 'kafka/consumer/base.py')
-rw-r--r-- | kafka/consumer/base.py | 8 |
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') |