diff options
author | Mahendra M <mahendra.m@gmail.com> | 2013-06-20 19:19:08 +0530 |
---|---|---|
committer | Mahendra M <mahendra.m@gmail.com> | 2013-06-20 19:19:08 +0530 |
commit | e690b75590837f24d456bb5e5c766dac8ac093ad (patch) | |
tree | 14e626c39d97a502835fcda0becae94375364531 /kafka/conn.py | |
parent | 612dea17c3fca1cb9283c6c60f6def7e76710d4c (diff) | |
download | kafka-python-e690b75590837f24d456bb5e5c766dac8ac093ad.tar.gz |
Make the default case as 'ack on local write'
Also, ensure that the case of 'no-acks' works fine
In conn.send(), do not wait for the response. Wait for it only on
conn.recv(). This behaviour is fine now since the connection is not
shared among consumer threads etc.
Diffstat (limited to 'kafka/conn.py')
-rw-r--r-- | kafka/conn.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kafka/conn.py b/kafka/conn.py index fce1fdc..aba3ada 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -76,11 +76,11 @@ class KafkaConnection(local): sent = self._sock.sendall(payload) if sent != None: raise RuntimeError("Kafka went away") - self.data = self._consume_response() def recv(self, requestId): "Get a response from Kafka" log.debug("Reading response %d from Kafka" % requestId) + self.data = self._consume_response() return self.data def close(self): |