diff options
author | mrtheb <mrlabbe@gmail.com> | 2013-10-01 15:15:36 -0400 |
---|---|---|
committer | David Arthur <mumrah@gmail.com> | 2013-10-03 11:31:25 -0400 |
commit | deb584c90802d382ca376331a8bf31bfb12d94dc (patch) | |
tree | b7ba890bda6d207d5a1d2f9c4940433c20056364 /kafka/consumer.py | |
parent | c304e3d4b080ce720e32abb820ab9120b8669d23 (diff) | |
download | kafka-python-deb584c90802d382ca376331a8bf31bfb12d94dc.tar.gz |
Cherry-pick mrtheb/kafka-python 2b016b69
Set FetchRequest MaxBytes value to bufsize instead of fetchsize (=MinBytes)
Diffstat (limited to 'kafka/consumer.py')
-rw-r--r-- | kafka/consumer.py | 5 |
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, |