Skip to main content
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

ParameterTypeDescriptionRequired
topicstringThe Kafka topic name to publish toYes
dataSegmentToSendstringWhich part of the data to send. Possible values: "fullData", "data". Defaults to "fullData"No
headersobjectOptional Kafka message headers (values must be strings)No
keystringThe message keyNo

Usage Examples

Basic Kafka Publish

{
  "command": "kafka-sink",
  "params": {
    "topic": "sports-events"
  }
}

Publish Only the Data Segment

{
  "command": "kafka-sink",
  "params": {
    "topic": "live-odds",
    "dataSegmentToSend": "data"
  }
}

Publish with Headers and Key

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