summaryrefslogtreecommitdiff
path: root/kafka/consumer.py
diff options
context:
space:
mode:
Diffstat (limited to 'kafka/consumer.py')
-rw-r--r--kafka/consumer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/kafka/consumer.py b/kafka/consumer.py
index c338337..3efffdf 100644
--- a/kafka/consumer.py
+++ b/kafka/consumer.py
@@ -359,7 +359,10 @@ class SimpleConsumer(Consumer):
fetch_size = self.fetch_min_bytes
while True:
- req = FetchRequest(self.topic, partition, offset, fetch_size)
+ # use MaxBytes = client's bufsize since we're only
+ # fetching one topic + partition
+ req = FetchRequest(
+ self.topic, partition, offset, self.client.bufsize)
(resp,) = self.client.send_fetch_request([req],
max_wait_time=self.fetch_max_wait_time,