summaryrefslogtreecommitdiff
path: root/kafka/client.py
diff options
context:
space:
mode:
authorDavid Arthur <mumrah@gmail.com>2013-04-01 21:09:48 -0400
committerDavid Arthur <mumrah@gmail.com>2013-04-02 20:19:30 -0400
commit864430c8c8ef0c1d05f7e62451320919b3be8eb7 (patch)
treef812c0a10edc9b1519f9fd55d310bd14e4402aea /kafka/client.py
parent0678a452ca7ad5fba8e947cbfcf8fcb0f87b902c (diff)
downloadkafka-python-864430c8c8ef0c1d05f7e62451320919b3be8eb7.tar.gz
Bring acks and timeout down to the client
Diffstat (limited to 'kafka/client.py')
-rw-r--r--kafka/client.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kafka/client.py b/kafka/client.py
index 862a30e..23b0a48 100644
--- a/kafka/client.py
+++ b/kafka/client.py
@@ -143,7 +143,7 @@ class KafkaClient(object):
for conn in self.conns.values():
conn.close()
- def send_produce_request(self, payloads=[], fail_on_error=True, callback=None):
+ def send_produce_request(self, payloads=[], acks=1, timeout=1000, fail_on_error=True, callback=None):
"""
Encode and send some ProduceRequests
@@ -162,8 +162,8 @@ class KafkaClient(object):
list of ProduceResponse or callback(ProduceResponse), in the order of input payloads
"""
resps = self._send_broker_aware_request(payloads,
- KafkaProtocol.encode_produce_request,
- KafkaProtocol.decode_produce_response)
+ partial(KafkaProtocol.encode_produce_request, acks=acks, timeout=timeout),
+ KafkaProtocol.decode_produce_response)
out = []
for resp in resps:
# Check for errors