# Kafka

### Supported Types

| Logs | Metrics | Traces |
| ---- | ------- | ------ |
| ✓    | ✓       | ✓      |

### Configuration Table

| Parameter               | Type                | Default                         | Description                                                                                                                                             |
| ----------------------- | ------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| telemetry\_types        | `telemetrySelector` | `["Logs", "Metrics", "Traces"]` | Specifies which types of telemetry to export.                                                                                                           |
| protocol\_version       | `enum`              | "2.0.0"                         | The Kafka protocol version to use when communicating with brokers. Valid values are: `"2.2.1"`, `"2.2.0"`, `"2.0.0"`, or `"1.0.0"`.                     |
| brokers                 | `strings`           | localhost:9092                  | A list of the brokers to connect to when sending metrics, traces, and logs.                                                                             |
| timeout                 | `int`               | 5                               | Timeout (seconds) for every attempt to send data to the backend.                                                                                        |
| log\_topic              | `string`            | otlp\_logs                      | The name of the topic to export logs to.                                                                                                                |
| log\_encoding           | `enum`              | otlp\_proto                     | The encoding to use when publishing logs to Kafka. Options are otlp\_proto, otlp\_json, and raw.                                                        |
| metric\_topic           | `string`            | otlp\_metrics                   | The name of the topic to export metrics to.                                                                                                             |
| metric\_encoding        | `enum`              | otlp\_proto                     | The encoding to use when publishing metrics to Kafka. Options are otlp\_proto and otlp\_json.                                                           |
| trace\_topic            | `string`            | otlp\_spans                     | The name of the topic to export traces to.                                                                                                              |
| trace\_encoding         | `enum`              | oltp\_proto                     | The encoding to use when publishing traces to Kafka. Options are otlp\_proto, otlp\_json, jaeger\_proto, jeager\_json, zipkin\_proto, and zipkin\_json. |
| compression             | `enum`              | gzip                            | The compression algorithm to use when publishing data to Kafka. Options are gzip, snappy, lz4, and none.                                                |
| enable\_auth            | `bool`              | false                           |                                                                                                                                                         |
| auth\_type              | `enum`              | basic                           | `basic`, `sasl`, or `kerberos`                                                                                                                          |
| basic\_username         | `string`            |                                 |                                                                                                                                                         |
| basic\_password         | `string`            |                                 |                                                                                                                                                         |
| sasl\_username          | `string`            |                                 |                                                                                                                                                         |
| sasl\_password          | `enum`              |                                 |                                                                                                                                                         |
| sasl\_mechanism         | `string`            | SCRAM-SHA-256                   | `SCRAM-SHA-256`, `SCRAM-SHA-512`, or `PLAIN`                                                                                                            |
| kerberos\_service\_name | `string`            |                                 |                                                                                                                                                         |
| kerberos\_realm         | `string`            |                                 |                                                                                                                                                         |
| kerberos\_config\_file  | `string`            | /etc/krb5.conf                  |                                                                                                                                                         |
| kerberos\_auth\_type    | `enum`              | keytab                          | `keytab` or `basic`                                                                                                                                     |
| kerberos\_keytab\_file  | `string`            | /etc/security/kafka.keytab      |                                                                                                                                                         |
| kerberos\_username      | `string`            |                                 |                                                                                                                                                         |
| kerberos\_password      | `string`            |                                 |                                                                                                                                                         |

### Supported Retry and Queuing Settings

This destination supports the [retry settings](https://docs.bindplane.com/configuration/bindplane-otel-collector/retry-on-failure), the [sending queue settings](https://docs.bindplane.com/configuration/bindplane-otel-collector/sending-queue), and the [persistent queue settings.](https://docs.bindplane.com/configuration/bindplane-otel-collector/persistent-queue)

| Sending Queue | Persistent Queue | Retry on Failure |
| ------------- | ---------------- | ---------------- |
| ✓             | ✓                | ✓                |

### Example Configuration

#### Basic Configuration

**Web Interface**

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2Fgit-blob-b11236acc2a92f98b86e8fd5320c783d9820d69d%2Fintegrations-destinations-kafka-image-1.png?alt=media" alt="Bindplane docs - Kafka - image 1"><figcaption></figcaption></figure>

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2Fgit-blob-ccdd41f80aca1ec4862a230058c796a198aa7414%2Fintegrations-destinations-kafka-image-2.png?alt=media" alt="Bindplane docs - Kafka - image 2"><figcaption></figcaption></figure>

**Standalone Destination**

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Destination
metadata:
  name: kafka
spec:
  type: kafka_otlp_destination
  parameters:
    - name: telemetry_types
      value:
        - Metrics
        - Logs
        - Traces
    - name: protocol_version
      value: 2.0.0
    - name: brokers
      value:
        - localhost:3333
    - name: timeout
      value: 50
    - name: metric_topic
      value: my_metrics
    - name: metric_encoding
      value: otlp_json
    - name: log_topic
      value: my_logs
    - name: log_encoding
      value: raw
    - name: trace_topic
      value: my_spans
    - name: trace_encoding
      value: zipkin_proto
    - name: compression
      value: gzip
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/integrations/destinations/kafka.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
