summaryrefslogtreecommitdiff
path: root/kafka/conn.py
diff options
context:
space:
mode:
authorMahendra M <mahendra.m@gmail.com>2013-06-20 19:19:08 +0530
committerMahendra M <mahendra.m@gmail.com>2013-06-20 19:19:08 +0530
commite690b75590837f24d456bb5e5c766dac8ac093ad (patch)
tree14e626c39d97a502835fcda0becae94375364531 /kafka/conn.py
parent612dea17c3fca1cb9283c6c60f6def7e76710d4c (diff)
downloadkafka-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.py2
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):