> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bringits.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Kafka Sink

> Publish job results to a Kafka topic via the sink service

The Kafka Sink command (Command Type: 1201) sends the job result to the sink service, which publishes it to a Kafka topic.

## Command Type

**Command Type ID:** 1201

## Parameters

| Parameter             | Type   | Description                                                                                       | Required |
| --------------------- | ------ | ------------------------------------------------------------------------------------------------- | -------- |
| **topic**             | string | The Kafka topic name to publish to                                                                | Yes      |
| **dataSegmentToSend** | string | Which part of the data to send. Possible values: `"fullData"`, `"data"`. Defaults to `"fullData"` | No       |
| **headers**           | object | Optional Kafka message headers (values must be strings)                                           | No       |
| **key**               | string | The message key                                                                                   | No       |

## Usage Examples

### Basic Kafka Publish

```json theme={null}
{
  "command": "kafka-sink",
  "params": {
    "topic": "sports-events"
  }
}
```

### Publish Only the Data Segment

```json theme={null}
{
  "command": "kafka-sink",
  "params": {
    "topic": "live-odds",
    "dataSegmentToSend": "data"
  }
}
```

### Publish with Headers and Key

```json theme={null}
{
  "command": "kafka-sink",
  "params": {
    "topic": "events",
    "key": "event-123",
    "headers": {
      "source": "scraper",
      "version": "2"
    }
  }
}
```

## Related Commands

* [RabbitMQ Sink](/stream/commands/sink/rabbitmq-sink) - Publish to RabbitMQ
* [S3 Sink](/stream/commands/sink/s3-sink) - Upload to S3
* [MongoDB Sink](/stream/commands/sink/mongodb-sink) - Write to MongoDB
