summaryrefslogtreecommitdiff
path: root/kafka/conn.py
Commit message (Collapse)AuthorAgeFilesLines
* Send socket data via non-blocking IO with send buffer (#1912)Dana Powers2019-09-291-8/+72
|
* Rely on socket selector to detect completed connection attempts (#1909)Dana Powers2019-09-281-5/+5
|
* Improve connection lock handling; always use context manager (#1895)Dana Powers2019-09-031-126/+151
|
* Update conn.pyCameron Boulton2019-08-161-0/+3
|
* Fix minor typo (#1865)Carson Ip2019-07-141-1/+1
|
* Catch TimeoutError in BrokerConnection send/recv (#1820)Dana Powers2019-05-291-6/+7
|
* Do not call state_change_callback with lock (#1775)Dana Powers2019-04-021-13/+21
|
* Additional BrokerConnection locks to synchronize protocol/IFR state (#1768)Dana Powers2019-04-021-61/+85
|
* Return connection state explicitly after close in connect() (#1778)Dana Powers2019-04-021-1/+3
|
* Reset reconnect backoff on SSL connection (#1777)Dana Powers2019-04-021-0/+1
|
* Fix possible AttribueError during conn._close_socket (#1776)Dana Powers2019-04-011-1/+1
|
* Revert 703f0659 / fix 0.8.2 protocol quick detection (#1763)Dana Powers2019-03-271-3/+0
|
* Update sasl configuration docstringsDana Powers2019-03-231-4/+4
|
* Support SASL OAuthBearer Authentication (#1750)Phong Pham2019-03-221-3/+57
|
* Allow configuration of SSL Ciphers (#1755)Dana Powers2019-03-211-1/+10
|
* Wrap SSL sockets after connecting (#1754)Dana Powers2019-03-211-19/+11
|
* Fix race condition in protocol.send_bytes (#1752)Filip Stefanak2019-03-211-1/+2
|
* Fix default protocol parser versionDana Powers2019-03-131-0/+3
|
* Don't recheck version if api_versions data is already cached (#1738)Dana Powers2019-03-131-0/+3
| | | I noticed during local testing that version probing was happening twice when connecting to newer broker versions. This was because we call check_version() once explicitly, and then again implicitly within get_api_versions(). But once we have _api_versions data cached, we can just return it and avoid probing versions a second time.
* Catch thrown OSError by python 3.7 when creating a connection (#1694)Daniel Johansson2019-03-121-0/+3
|
* Synchronize puts to KafkaConsumer protocol buffer during async sendsDana Powers2019-03-121-21/+36
|
* Do network connections and writes in KafkaClient.poll() (#1729)Dana Powers2019-03-081-19/+30
| | | | | | * Add BrokerConnection.send_pending_requests to support async network sends * Send network requests during KafkaClient.poll() rather than in KafkaClient.send() * Dont acquire lock during KafkaClient.send if node is connected / ready * Move all network connection IO into KafkaClient.poll()
* Timeout all unconnected conns (incl SSL) after request_timeout_msDana Powers2019-01-131-6/+8
|
* Fix SSL connection testing in Python 3.7Ben Weir2019-01-031-0/+7
|
* Stop using broker-errors for client-side problemsJeff Widman2018-11-181-1/+1
| | | | | | | | | | | | | `UnsupportedVersionError` is intended to indicate a server-side error: https://github.com/dpkp/kafka-python/blob/ba7372e44ffa1ee49fb4d5efbd67534393e944db/kafka/errors.py#L375-L378 So we should not be raising it for client-side errors. I realize that semantically this seems like the appropriate error to raise. However, this is confusing when debugging... for a real-life example, see https://github.com/Parsely/pykafka/issues/697. So I strongly feel that server-side errors should be kept separate from client-side errors, even if all the client is doing is proactively protecting against hitting a situation where the broker would return this error.
* Add KafkaAdmin classRichard Lee2018-10-241-0/+10
| | | | | | Requires cluster version > 0.10.0.0, and uses new wire protocol classes to do many things via broker connection that previously needed to be done directly in zookeeper.
* add kerberos domain name config for gssapi sasl mechanism handshake (#1542)the-sea2018-08-311-2/+6
|
* add support for smaller topic metadata fetch during bootstrap (#1541)Ning Xie2018-08-311-3/+3
|
* Improve connection handling when bootstrap list is invalid (#1507)Dana Powers2018-05-261-6/+3
| | | | * only perform single dns lookup for connect_blocking() * fix blocking timeout in check_version()
* Stop shadowing `ConnectionError`Jeff Widman2018-05-231-14/+14
| | | | | | | | | | In Python3, `ConnectionError` is a native exception. So rename our custom one to `KafkaConnectionError` to prevent accidentally shadowing the native one. Note that there are still valid uses of `ConnectionError` in this code. They already expect a native Python3 `ConnectionError`, and also already handle the Python2 compatibility issues.
* Improve BrokerConnection initialization (#1475)Rômulo Rosa Furtado2018-04-151-1/+1
|
* Fix KafkaConsumer docstring for request_timeout_ms default (#1459)Dana Powers2018-03-231-2/+2
|
* Connect with sockaddrs to support non-zero ipv6 scope ids (#1433)Dana Powers2018-03-091-13/+10
|
* Re-enable logging during broker version check (#1430)Dana Powers2018-03-091-12/+1
|
* Connection logging cleanups (#1432)Dana Powers2018-03-091-4/+5
|
* Add BrokerConnection.connect_blocking() (#1411)Dana Powers2018-03-091-17/+47
|
* Short-circuit BrokerConnection.close() if already disconnected (#1424)Dana Powers2018-03-091-3/+6
|
* Only increase reconnect backoff if all addrinfos have been tried (#1423)Dana Powers2018-03-091-1/+4
|
* Close leaked selector in version check (#1425)Dana Powers2018-03-091-0/+1
|
* Make BrokerConnection .host / .port / .afi immutable, use _sock_* attributes ↵Dana Powers2018-03-091-15/+25
| | | | for current lookups (#1422)
* Fix BrokerConnection.connection_delay() to return milliseconds (#1414)Dana Powers2018-03-081-2/+9
|
* use absolute imports everywhere (#1362)Kevin Tindall2018-02-061-3/+3
|
* Add Request/Response structs for kafka broker 1.0.0Dana Powers2018-02-061-0/+1
|
* Fix for Python 3 byte string handling in SASL auth (#1353)Christophe Lecointe2018-01-241-2/+2
|
* Honor reconnect_backoff in conn.connect() (#1342)Dana Powers2018-01-111-1/+1
| | | * Honor reconnect_backoff in conn.connect()
* Read all available socket bytes (#1332)Dana Powers2018-01-101-22/+22
| | | | * Recv all available network bytes before parsing * Add experimental support for configuring socket chunking parameters
* Improve KafkaConsumer cleanup (#1339)Dana Powers2018-01-101-3/+9
|
* Fix typo in _try_authenticate_plain (#1333)everpcpc2017-12-281-1/+1
|
* Add security layer negotiation to the GSSAPI authentication. (#1283)Andre Araujo2017-12-261-22/+43
| | | | | | | | | | | | | | | | | | When trying to establish a connection with Kafka using SASL with the GSSAPI authentication mechanism the connection was hanging an timing out after 60 secons. On the Kafka broker side I noticed that the SaslServerAuthenticator was going from the AUTHENTICATE to the FAILED state. The GSSAPI auth implementation was missing the second handshake defined in RFC 2222, which happens after the security context is established. This handshake is used by the client and server to negotiate the security layer (QoP) to be used for the connection. Kafka currently only support the "auth" QoP, so the implementation in this commit doesn't make it configurable, but this can be extended later. With this change I was able to successfully connect to a Kerberos-enabled Kafka broker using the SASL_PLAINTEXT protocol and the GSSAPI mechanism.
* KAFKA-3888 Use background thread to process consumer heartbeats (#1266)Dana Powers2017-12-211-1/+1
|