BrokerConnection¶
-
class
kafka.BrokerConnection(host, port, **configs)¶ -
blacked_out()¶ Return true if we are disconnected from the given node and can’t re-establish a connection yet
-
can_send_more()¶ Return True unless there are max_in_flight_requests.
-
close(error=None)¶ Close socket and fail all in-flight-requests.
Parameters: error (Exception, optional) – pending in-flight-requests will be failed with this exception. Default: kafka.common.ConnectionError.
-
connect()¶ Attempt to connect and return ConnectionState
-
connected()¶ Return True iff socket is connected.
-
recv(timeout=0)¶ Non-blocking network receive.
Return response if available
-
send(request, expect_response=True)¶ send request, return Future()
Can block on network if request is larger than send_buffer_bytes
-