summaryrefslogtreecommitdiff
path: root/kafka/conn.py
Commit message (Collapse)AuthorAgeFilesLines
* Add Kafka 2.6.0 to tests and protocol compatibility matrix (#2162)Lourens Naudé2020-11-151-1/+2
| | | | * Co-authored-by: Andrew Brown <andrew.brown@shopify.com> * Co-authored-by: Aaron Brady <aaron.brady@shopify.com>
* Add logic for inferring newer broker versions (#2038)Tincu Gabriel2020-05-051-1/+11
| | | | | | | | | | | | | | * Add logic for inferring newer broker versions - New Fetch / ListOffsets request / response objects - Add new test cases to inferr code based on mentioned objects - Add unit test to check inferred version against whatever resides in KAFKA_VERSION - Add new kafka broker versions to integration list - Add more kafka broker versions to travis task list - Add support for broker version 2.5 id * Implement PR change requests: fewer versions for travis testing, remove unused older versions for inference code, remove one minor version from known server list Do not use newly created ACL request / responses in allowed version lists, due to flexible versions enabling in kafka actually requiring a serialization protocol header update Revert admin client file change
* Reset conn configs on exception in conn.check_version() (#1977)Dana Powers2019-12-291-2/+7
|
* Style updates to scram sasl supportDana Powers2019-12-291-78/+5
|
* Enable SCRAM-SHA-256 and SCRAM-SHA-512 for sasl (#1918)Swen Wenzel2019-12-291-11/+136
|
* Improve docs for reconnect_backoff_max_ms (#1976)Dana Powers2019-12-281-5/+6
|
* Fix typosCarson Ip2019-11-081-2/+2
|
* 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
|