Skip to content

Instantly share code, notes, and snippets.

@FisherKK
Last active July 17, 2018 08:59
Show Gist options
  • Save FisherKK/b39e030274c1beb0632dfefbfb1e6c50 to your computer and use it in GitHub Desktop.
Save FisherKK/b39e030274c1beb0632dfefbfb1e6c50 to your computer and use it in GitHub Desktop.

Source: https://kafka-python.readthedocs.io/en/master/apidoc/KafkaConsumer.html

max_in_flight_requests_per_connection (int)

Requests are pipelined to kafka brokers up to this number of maximum requests per broker connection. Default: 5.

fetch_max_wait_ms (int)

The maximum amount of time in milliseconds the server will block before answering the fetch request if there isn’t sufficient data to immediately satisfy the requirement given by fetch_min_bytes. Default: 500.

request_timeout_ms (int)

Client request timeout in milliseconds. Default: 305000.

retry_backoff_ms (int)

Milliseconds to backoff when retrying on errors. Default: 100.

reconnect_backoff_ms (int)

The amount of time in milliseconds to wait before attempting to reconnect to a given host. Default: 50.

reconnect_backoff_max_ms (int)

The maximum amount of time in milliseconds to wait when reconnecting to a broker that has repeatedly failed to connect. If provided, the backoff per host will increase exponentially for each consecutive connection failure, up to this maximum. To avoid connection storms, a randomization factor of 0.2 will be applied to the backoff resulting in a random range between 20% below and 20% above the computed value. Default: 1000.

session_timeout_ms (int)

The timeout used to detect failures when using Kafka’s group management facilities. The consumer sends periodic heartbeats to indicate its liveness to the broker. If no heartbeats are received by the broker before the expiration of this session timeout, then the broker will remove this consumer from the group and initiate a rebalance. Note that the value must be in the allowable range as configured in the broker configuration by group.min.session.timeout.ms and group.max.session.timeout.ms. Default: 10000

consumer_timeout_ms (int)

Number of milliseconds to block during message iteration before raising StopIteration (i.e., ending the iterator). Default block forever [float(‘inf’)].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment