diff options
author | Dana Powers <dana.powers@rd.io> | 2016-01-07 17:08:32 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@rd.io> | 2016-01-07 17:08:32 -0800 |
commit | 19d403c743c99b0ecf8084bc35ee3718f624ca3f (patch) | |
tree | bab6e20297c74cfe4113599690e15cff89ab364e /kafka/client_async.py | |
parent | e080c6b0cdb54563e3c5ad595d582de26561d9f0 (diff) | |
download | kafka-python-19d403c743c99b0ecf8084bc35ee3718f624ca3f.tar.gz |
Add metadata_max_age_ms and retry_backoff_ms options to async client
Diffstat (limited to 'kafka/client_async.py')
-rw-r--r-- | kafka/client_async.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kafka/client_async.py b/kafka/client_async.py index 747a85f..54d8153 100644 --- a/kafka/client_async.py +++ b/kafka/client_async.py @@ -40,6 +40,8 @@ class KafkaClient(object): 'max_in_flight_requests_per_connection': 5, 'receive_buffer_bytes': 32768, 'send_buffer_bytes': 131072, + 'retry_backoff_ms': 100, + 'metadata_max_age_ms': 300000, } def __init__(self, **configs): @@ -69,6 +71,12 @@ class KafkaClient(object): (SO_SNDBUF) to use when sending data. Default: 131072 receive_buffer_bytes (int): The size of the TCP receive buffer (SO_RCVBUF) to use when reading data. Default: 32768 + metadata_max_age_ms (int): The period of time in milliseconds after + which we force a refresh of metadata even if we haven't seen any + partition leadership changes to proactively discover any new + brokers or partitions. Default: 300000 + retry_backoff_ms (int): Milliseconds to backoff when retrying on + errors. Default: 100. """ self.config = copy.copy(self.DEFAULT_CONFIG) for key in self.config: |