BrokerConnection¶
-
class
kafka.
BrokerConnection
(host, port, afi, **configs)[source]¶ -
blacked_out
()[source]¶ Return true if we are disconnected from the given node and can’t re-establish a connection yet
-
check_version
(timeout=2, strict=False)[source]¶ Attempt to guess the broker version.
Note: This is a blocking call.
Returns: version tuple, i.e. (0, 10), (0, 9), (0, 8, 2), ...
-
close
(error=None)[source]¶ Close socket and fail all in-flight-requests.
Parameters: error (Exception, optional) – pending in-flight-requests will be failed with this exception. Default: kafka.errors.ConnectionError.
-