Skip to content

Commit 8be2568

Browse files
committed
DefaultRecordsBatchBuilder: support empty batch
1 parent 585a111 commit 8be2568

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kafka/record/default_records.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,8 @@ def write_header(self, use_compression_type=True):
556556
0, # CRC will be set below, as we need a filled buffer for it
557557
self._get_attributes(use_compression_type),
558558
self._last_offset,
559-
self._first_timestamp,
560-
self._max_timestamp,
559+
self._first_timestamp or 0,
560+
self._max_timestamp or 0,
561561
self._producer_id,
562562
self._producer_epoch,
563563
self._base_sequence,

0 commit comments

Comments
 (0)