summaryrefslogtreecommitdiff
path: root/kafka/record
diff options
context:
space:
mode:
authorKeith So <keithks@gmail.com>2019-03-13 21:48:53 +0800
committerDana Powers <dana.powers@gmail.com>2019-03-13 06:48:53 -0700
commit7965460a7253a5f5c23e7343c0c06c40e40f471e (patch)
tree21071e62b5109824cb066a084c952a101c4054bf /kafka/record
parent1904b536b0a6fb83e006f3a61b2aa360797cf838 (diff)
downloadkafka-python-7965460a7253a5f5c23e7343c0c06c40e40f471e.tar.gz
1701 use last offset from fetch v4 if available (#1724)
Diffstat (limited to 'kafka/record')
-rw-r--r--kafka/record/default_records.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/kafka/record/default_records.py b/kafka/record/default_records.py
index 955e3ee..7f0e2b3 100644
--- a/kafka/record/default_records.py
+++ b/kafka/record/default_records.py
@@ -141,6 +141,10 @@ class DefaultRecordBatch(DefaultRecordBase, ABCRecordBatch):
return self._header_data[5]
@property
+ def last_offset_delta(self):
+ return self._header_data[6]
+
+ @property
def compression_type(self):
return self.attributes & self.CODEC_MASK