# Kafka

Site [llms.txt](/llms.txt)

---

## Kafka Attributes

This group describes attributes specific to Apache Kafka.

**Attributes:**

| Key | Stability | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- |
| <a id="kafka-cluster-id" href="#kafka-cluster-id">`kafka.cluster.id`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The Kafka cluster ID, obtained from the broker metadata exposed through the Kafka client (or AdminClient) API. [1] | `MkU3OEVBNTcwNTJENDM2Qk` |
| <a id="kafka-message-key" href="#kafka-message-key">`kafka.message.key`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. [2] | `myKey` |
| <a id="kafka-message-tombstone" href="#kafka-message-tombstone">`kafka.message.tombstone`</a> | ![Development](https://img.shields.io/badge/-development-blue) | boolean | A boolean that is true if the message is a tombstone. | |
| <a id="kafka-offset" href="#kafka-offset">`kafka.offset`</a> | ![Development](https://img.shields.io/badge/-development-blue) | int | The offset of a record in the corresponding Kafka partition. | `42` |

**[1] `kafka.cluster.id`:** The cluster ID is a unique identifier reported by the Kafka broker. It identifies the cluster independently of the individual brokers the client is configured to connect to, and remains stable even if broker hostnames, IP addresses, or ports change.

**[2] `kafka.message.key`:** If the key type is not string, its string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.
