The Kafka result output is deprecated. Please use the output extension instead.
Apache Kafka is a stream-processing platform for handling real-time data.
When running a test, k6 can send the metrics in real-time to Kafka.
You can configure the broker (or multiple ones), topic and message format directly from the command line parameter like this:
or if you want multiple brokers:
You can also specify the message format k6 will use. By default, it will be the same as the JSON output, but you can also use the InfluxDB line protocol for direct "consumption" by InfluxDB:
You can even modify some of the format settings such as tagsAsFields: