> For the complete documentation index, see [llms.txt](https://docs.elastiflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elastiflow.com/data_platforms/kafka.md). Agents can also search and read this documentation through its [MCP server](https://docs.elastiflow.com/~gitbook/mcp).

# Kafka

This page outlines the required steps to connect ElastiFlow to Kafka.

In the ElastiFlow configuration /etc/elastiflow/flowcoll.yml you need to configure the following lines&#x20;

To view all configuration options please refer to:

<https://www.elastiflow.com/docs/config_ref/common/output_kafka/#overview>

Specify the IP for the Kafka broker&#x20;

**EF\_OUTPUT\_KAFKA\_BROKERS: 10.101.2.179:9093**&#x20;

If you want to export data from ElastiFlow in Elasticsearch Common Schema enable the following. If this is not set field names will default to the ElastiFlow codex schema.

**EF\_OUTPUT\_KAFKA\_ECS\_ENABLE: "true"**&#x20;

Enable Kafka output&#x20;

**EF\_OUTPUT\_KAFKA\_ENABLE: "true"**&#x20;

If you want to flatten the JSON record set this to true

**EF\_OUTPUT\_KAFKA\_FLAT\_RECORD\_ENABLE: "true"**&#x20;

Set the Kafka topic name

**EF\_OUTPUT\_KAFKA\_TOPIC**

Enable TLS or MTLS

**EF\_OUTPUT\_KAFKA\_TLS\_KEY\_FILEPATH: "/etc/elastiflow/certs/flowcoll.key" EF\_OUTPUT\_KAFKA\_TLS\_SKIP\_VERIFICATION: "false"**&#x20;

**EF\_OUTPUT\_KAFKA\_TLS\_CA\_CERT\_FILEPATH: "/etc/elastiflow/certs/ca.crt" EF\_OUTPUT\_KAFKA\_TLS\_CERT\_FILEPATH: "/etc/elastiflow/certs/flowcoll.crt" EF\_OUTPUT\_KAFKA\_TLS\_ENABLE: "true"**&#x20;

#### &#x20;<a href="#ef_output_kafka_topic" id="ef_output_kafka_topic"></a>

#### &#x20;<a href="#ef_output_kafka_topic" id="ef_output_kafka_topic"></a>
