K6 Kafka Client Settings

Trying to use the k6 kafka plugin to route the results to Azure Event Hub (which has a kafka head enabled) . So to use event hub with kafka we need to set some variables as provided in this link:

The kafka client configs need to be changed if they have to work with event hubs in azure

sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="{YOUR.EVENTHUBS.CONNECTION.STRING}";

Is there a way to provide this settings to the Kafka client used by K6? Or how can we extend the k6 plugin to enable this?

Hi @Priya,

This is how you can configure k6 to send metrics to Kafka topics. I’ve also written an article on our blog that shows how to integrate k6 with Kafka.

Yet, SSL is not supported by the current Kafka implementation. There were a PR for supporting SSL/TLS with Kafka, but the author decided to pull out and come back with more tests and examples, since I couldn’t test it.

Also, the plugin support PR is not merged yet, due to other high-priority tasks on the table, but it will be merged eventually.