Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes deprecated APIs errors while running k6 (#38) and replaces them with the new APIs from k6 modules. The only issue with the changes is that SASL PLAIN/SCRAM doesn't seem to work. I'll fix this issue, and then I'll merge this PR.
I retested with the old API, and I noticed no difference or improvements in performance overall. It could be that the evolution of the kafka-go library and updating the k6 caused this massive speedup (expand and see below) compared to the original test in the README.
xk6-kafka is faster now? 🤔
The new changes made the extension more than 3x faster on fast-data-dev containers:
and 4x faster on a bare Zookeeperless instance of Apache Kafka (v3.1.0 on Scala v2.13), compared to the previous results:
Update:
I couldn't figure out how to test SASL (no SSL), and I need someone to test it against a working instance of Kafka with SASL PLAIN/SCRAM enabled. I'll merge this, but won't release it until I fully test it. This means that you can test the feature by compiling with the latest commits on the
main
branch, but it won't be available as binary and a Docker image yet.