Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Error if connections_max_idle_ms not larger than request_timeout_ms (#1688) | Jeff Widman | 2019-03-14 | 1 | -2/+6 |
| | |||||
* | Retry bootstrapping after backoff when necessary (#1736) | Dana Powers | 2019-03-14 | 1 | -45/+23 |
| | | | | | | | The current client attempts to bootstrap once during initialization, but if it fails there is no second attempt and the client will be inoperable. This can happen, for example, if an entire cluster is down at the time a long-running client starts execution. This commit attempts to fix this by removing the synchronous bootstrapping from `KafkaClient` init, and instead merges bootstrap metadata with the cluster metadata. The Java client uses a similar approach. This allows us to continue falling back to bootstrap data when necessary throughout the life of a long-running consumer or producer. Fix #1670 | ||||
* | Mock dns lookups in test_conn (#1739) | Dana Powers | 2019-03-13 | 1 | -1/+8 |
| | | | Small change to avoid doing dns resolution when running local connection tests. This fixture always returns a broker on localhost:9092, so DNS lookups don't make sense here. | ||||
* | Recheck connecting nodes sooner when refreshing metadata (#1737) | Dana Powers | 2019-03-13 | 1 | -1/+1 |
| | |||||
* | Synchronize puts to KafkaConsumer protocol buffer during async sends | Dana Powers | 2019-03-12 | 1 | -4/+24 |
| | |||||
* | Do network connections and writes in KafkaClient.poll() (#1729) | Dana Powers | 2019-03-08 | 2 | -8/+8 |
| | | | | | | * 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() | ||||
* | Use test.fixtures.version not test.conftest.version to avoid warnings (#1731) | Dana Powers | 2019-03-06 | 4 | -8/+4 |
| | |||||
* | Fix test_legacy_correct_metadata_response on x86 arch (#1718) | Stanislav Levin | 2019-02-21 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the type of required operation result is "long". ``` >>> type(278251978 & 0xffffffff) <type 'long'> ``` However, by default "format" method uses __format__(): ``` >>> (278251978 & 0xffffffff).__format__('') '278251978' ``` So, let's compare things using the same engine: ``` >>> "{!r}".format(278251978 & 0xffffffff) '278251978L' ``` Fixes: https://github.com/dpkp/kafka-python/issues/1717 Signed-off-by: Stanislav Levin <slev@altlinux.org> | ||||
* | Use Popen.communicate() instead of Popen.wait() | Brian Sang | 2019-01-05 | 1 | -9/+10 |
| | | | | | Popen objects may deadlock when using stdout=PIPE or stderr=PIPE with Popen.wait(). Using Popen.communicate() avoids the issue. | ||||
* | Cleanup formatting, no functional changes | Jeff Widman | 2018-11-20 | 1 | -23/+23 |
| | | | | Cleanup the formatting, remove parens, extraneous spaces, etc. | ||||
* | Be explicit with tuples for %s formatting | Jeff Widman | 2018-11-18 | 4 | -7/+7 |
| | | | | Fix #1633 | ||||
* | Migrate from `Unittest` to `pytest` (#1620) | Jeff Widman | 2018-11-10 | 6 | -72/+34 |
| | |||||
* | Cleanup fixture imports | Jeff Widman | 2018-10-27 | 7 | -15/+10 |
| | | | | | | | | | | | | | | | `random_string` now comes from `test.fixtures` and was being transparently imported via `test.testutil` so this bypasses the pointless indirect import. Similarly, `kafka_version` was transparently imported by `test.testutil` from `test.fixtures`. Also removed `random_port()` in `test.testutil` because its unused as its been replaced by the one in `test.fixtures`. This is part of the pytest migration that was started back in a1869c4be5f47b4f6433610249aaf29af4ec95e5. | ||||
* | Minor aesthetic cleanup of partitioner tests | Jeff Widman | 2018-10-27 | 1 | -11/+10 |
| | |||||
* | Remove unused ivy_root variable | Jeff Widman | 2018-10-27 | 1 | -1/+0 |
| | | | | This is no longer used anywhere in the codebase | ||||
* | Add KafkaAdmin class | Richard Lee | 2018-10-24 | 1 | -0/+47 |
| | | | | | | 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. | ||||
* | Vendor `six` consistently | Jeff Widman | 2018-10-22 | 10 | -23/+23 |
| | | | | Use vendored `six`, and also `six.moves.range` rather than `xrange` | ||||
* | Fix typo in file name | Jeff Widman | 2018-10-22 | 1 | -0/+0 |
| | |||||
* | Support produce with Kafka record headers | Heikki Nousiainen | 2018-09-27 | 1 | -1/+9 |
| | |||||
* | Expose record headers in ConsumerRecords | Heikki Nousiainen | 2018-09-27 | 1 | -3/+3 |
| | |||||
* | Add positive tests for headers in record encode/decode | Heikki Nousiainen | 2018-09-27 | 2 | -3/+18 |
| | |||||
* | Don't use `kafka.common` internally1.3.5 | Jeff Widman | 2018-06-05 | 6 | -13/+14 |
| | | | | This finishes the split from `kafka.common` to `kafka.errors`/`kafka.structs`. | ||||
* | Ignore MetadataResponses with empty broker list (#1506) | Dana Powers | 2018-05-26 | 1 | -0/+22 |
| | |||||
* | Stop shadowing `ConnectionError` | Jeff Widman | 2018-05-23 | 3 | -6/+6 |
| | | | | | | | | | | 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. | ||||
* | Skip flakey SimpleProducer test | Dana Powers | 2018-04-18 | 1 | -0/+1 |
| | |||||
* | Add codec validators to record parser and builder for all formats (#1447) | Taras | 2018-04-18 | 5 | -5/+96 |
| | |||||
* | Fix MemoryRecord bugs re error handling and add test coverage (#1448) | Taras | 2018-04-18 | 1 | -1/+68 |
| | |||||
* | Change SimpleProducer to use async_send (async is reserved in py37) (#1454) | Dana Powers | 2018-03-23 | 3 | -13/+13 |
| | |||||
* | Fix skipped integration tests if KAFKA_VERSION unset (#1453) | Dana Powers | 2018-03-22 | 2 | -0/+9 |
| | |||||
* | Connect with sockaddrs to support non-zero ipv6 scope ids (#1433) | Dana Powers | 2018-03-09 | 1 | -15/+12 |
| | |||||
* | Add BrokerConnection.connect_blocking() (#1411) | Dana Powers | 2018-03-09 | 2 | -3/+6 |
| | |||||
* | Make BrokerConnection .host / .port / .afi immutable, use _sock_* attributes ↵ | Dana Powers | 2018-03-09 | 1 | -9/+20 |
| | | | | for current lookups (#1422) | ||||
* | Fix BrokerConnection.connection_delay() to return milliseconds (#1414) | Dana Powers | 2018-03-08 | 1 | -0/+9 |
| | |||||
* | Close KafkaConsumer instances during tests (#1410) | Dana Powers | 2018-03-08 | 3 | -1/+11 |
| | |||||
* | Fix KafkaConsumer compacted offset handling (#1397) | Dana Powers | 2018-02-26 | 1 | -2/+19 |
| | |||||
* | Fixes racing condition when message is sent to broker before topic logs are ↵ | Andre Araujo | 2018-02-21 | 1 | -3/+19 |
| | | | | created | ||||
* | Introduce new fixtures to prepare for migration to pytest. | Andre Araujo | 2018-02-21 | 7 | -157/+458 |
| | | | | | | | This commits adds new pytest fixtures in prepation for the migration of unittest.TestCases to pytest test cases. The handling of temporary dir creation was also changed so that we can use the pytest tmpdir fixture after the migration. | ||||
* | Use hardware accelerated CRC32C function if available (#1389) | Taras Voinarovskyi | 2018-02-21 | 1 | -2/+3 |
| | | | | | | * Use hardware accelerated CRC32C function if available * Add doc notice of optional `crc32c` package | ||||
* | Increase some integration test timeouts (#1374) | Dana Powers | 2018-02-08 | 4 | -10/+24 |
| | |||||
* | Avoid consuming duplicate compressed messages from mid-batch (#1367) | Dana Powers | 2018-02-05 | 1 | -0/+40 |
| | |||||
* | KAFKA-3949: Avoid race condition when subscription changes during rebalance ↵ | Dana Powers | 2018-02-02 | 1 | -37/+21 |
| | | | | (#1364) | ||||
* | Use 0.11.0.2 kafka broker for integration testing (#1357) | Dana Powers | 2018-01-25 | 1 | -1/+1 |
| | |||||
* | Minor test cleanups (#1343) | Dana Powers | 2018-01-12 | 3 | -2/+5 |
| | |||||
* | Honor reconnect_backoff in conn.connect() (#1342) | Dana Powers | 2018-01-11 | 1 | -0/+2 |
| | | | * Honor reconnect_backoff in conn.connect() | ||||
* | Fix coordinator join_future race condition (#1338) | Dana Powers | 2018-01-11 | 1 | -0/+13 |
| | | | * Fix race condition in coordinator join_future handling | ||||
* | KAFKA-3888 Use background thread to process consumer heartbeats (#1266) | Dana Powers | 2017-12-21 | 5 | -56/+107 |
| | |||||
* | Minor Exception cleanup | Jeff Widman | 2017-12-12 | 3 | -4/+4 |
| | |||||
* | Refactor dns lookup in BrokerConnection (#1312) | Dana Powers | 2017-12-08 | 1 | -0/+25 |
| | |||||
* | Change fixture default host to localhost (#1305) | Andre Araujo | 2017-12-05 | 1 | -15/+1 |
| | |||||
* | Revert ffc7caef13a120f69788bcdd43ffa01468f575f9 / PR #1239 | Dana Powers | 2017-11-16 | 1 | -23/+0 |
| | | | | The change caused a regression documented in issue #1290 |