Skip to content

Commit 1ceeb52

Browse files
committed
Suffix byte arguments with _bytes
1 parent c8945c0 commit 1ceeb52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kafka/producer/kafka.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,14 +496,14 @@ def _max_usable_produce_magic(self):
496496
else:
497497
return 0
498498

499-
def _estimate_size_in_bytes(self, key, value, headers=[]):
499+
def _estimate_size_in_bytes(self, key_bytes, value_bytes, headers=[]):
500500
magic = self._max_usable_produce_magic()
501501
if magic == 2:
502502
return DefaultRecordBatchBuilder.estimate_size_in_bytes(
503-
key, value, headers)
503+
key_bytes, value_bytes, headers)
504504
else:
505505
return LegacyRecordBatchBuilder.estimate_size_in_bytes(
506-
magic, self.config['compression_type'], key, value)
506+
magic, self.config['compression_type'], key_bytes, value_bytes)
507507

508508
def send(self, topic, value=None, key=None, partition=None, timestamp_ms=None):
509509
"""Publish a message to a topic.

0 commit comments

Comments
 (0)