Files
wehub-resource-sync a9cd7750f4
CI / unit-test (push) Has been cancelled
CI / detect-changes (push) Has been cancelled
CI / build (push) Has been cancelled
Publish docs via GitHub Pages / Deploy docs (push) Has been cancelled
CI / test-harness (push) Has been cancelled
CI / generate-e2e-matrix (push) Has been cancelled
CI / e2e (push) Has been cancelled
CI / build-ui (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
UI v2 Integration CI / E2E (Integration) (push) Has been cancelled
UI v2 CI / Lint, Format & Test (push) Has been cancelled
UI v2 CI / E2E (Mocked) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:37:56 +08:00

2.8 KiB

description
description
Kafka Publish Task — send messages to Kafka topics from Conductor workflows with configurable serialization.

Kafka Publish Task

"type" : "KAFKA_PUBLISH"

The Kafka Publish task (KAFKA_PUBLISH) is used to push messages to another microservice via Kafka.

Task parameters

The task expects a field named kafka_request as part of the task's inputParameters.

Use these parameters inside inputParameters in the Kafka Publish task configuration.

Parameter Type Description Required / Optional
kafka_request KafkaRequest JSON object containing the bootstrap server, message, and more. Required.
kafka_request.bootStrapServers String The bootstrap server for connecting to the Kafka cluster. Required.
kafka_request.topic String The topic to publish the message to. Required.
kafka_request.value Any The message to publish. Required.
kafka_request.key String The Kafka message key. Messages with the same key will be sent to the same topic partition. Optional.
kafka_request.keySerializer String (enum) The serializer used for serializing the message key. The default is StringSerializer. Supported values:
  • org.apache.kafka.common.serialization.IntegerSerializer
  • org.apache.kafka.common.serialization.LongSerializer
  • org.apache.kafka.common.serialization.StringSerializer
Optional.
kafka_request.headers Map[String, Any] Any additional headers to be sent along with the Kafka message. Optional.
kafka_request.requestTimeoutMs Integer The request timeout in milliseconds while awaiting a response. Optional.
kafka_request.maxBlockMs Integer The maximum blocking time while publishing to Kafka. Optional.

JSON configuration

Here is the task configuration for a Kafka Publish task.

{
  "name": "kafka",
  "taskReferenceName": "kafka_ref",
  "inputParameters": {
    "kafka_request": {
      "topic": "userTopic",
      "value": "Message to publish",
      "bootStrapServers": "localhost:9092",
      "headers": {
        "x-Auth":"Auth-key"    
      },
      "key": "123",
      "keySerializer": "org.apache.kafka.common.serialization.IntegerSerializer"
    }
  },
  "type": "KAFKA_PUBLISH"
}

Output

The task transitions to COMPLETED if the message has been successfully published to the Kafka queue, or marked as FAILED if the message could not be published.