This PR contains the following improvements on that version:
It fixes review comments: adds tests and removes formatting peculiarities
It contains an optimization that is important to me: if multiple partitions live on the same broker, it sends one request, instead of one per partition. It is important because I use delete_records in integration tests, and this significantly improves test startup/teardown speed.
It checks for errors as much as it can.
I tested it locally with 2.6.0 + py3.9, I'm assuming CI will check for everything else.
Additionally, I would like some direction from maintainers on whether it is possible/required to test this with a multi-broker setup - I couldn't find an example in the tests that uses multiple brokers.
Hey!
This PR is based on https://github.com/dpkp/kafka-python/pull/2062 It implements delete_records for AdminClient. Thanks to @10101010 for the initial PR.
This PR contains the following improvements on that version:
I tested it locally with 2.6.0 + py3.9, I'm assuming CI will check for everything else. Additionally, I would like some direction from maintainers on whether it is possible/required to test this with a multi-broker setup - I couldn't find an example in the tests that uses multiple brokers.
Resolves: #2344
This change is