Kafka Producer Enhanced icon

Kafka Producer Enhanced

Sends messages to a Kafka topic

Producer

AI-generated

Summary

Publishes one Kafka message for each input item to the configured topic, using either the item’s JSON or a fixed message. It can add message keys and headers, optionally encode messages with Confluent Schema Registry, and configure producer acknowledgements, compression, and timeout.

Inputs

  • Topic (required) — Kafka topic to publish each message to.
  • Send Input Data — Defaults to true. When enabled, sends each input item's JSON as a JSON string. When disabled, sends the configured Message string for each item.
  • Message — Message string used when Send Input Data is disabled.
  • Use Schema Registry — Defaults to false. When enabled, requires Schema Registry URL and Event Name; the node parses the message as JSON and encodes it using the latest schema ID for that event.
  • Schema Registry URL — Required when Use Schema Registry is enabled.
  • Event Name — Required when Use Schema Registry is enabled; identifies the schema as namespace.name.
  • Use Key — Defaults to false. Enable to attach the configured Key to each message.
  • Key — Required when Use Key is enabled.
  • Headers — Add headers as key/value pairs when JSON Parameters is disabled.
  • Headers (JSON) — Provide headers as a flat JSON object when JSON Parameters is enabled; invalid JSON causes an error.
  • JSON Parameters — Defaults to false. Selects whether headers are entered as key/value pairs or as a JSON object.
  • Options — Optional producer settings: Acks defaults to false (sent as Kafka acks=1; true uses -1), Compression defaults to false (GZIP when true), and Timeout defaults to 30000 ms.

Output shape

A list of Kafka send result items, or a success item when Kafka returns no send results.

The node sends all input items in one batch and returns KafkaJS sendBatch response data. With Continue On Fail enabled, errors are returned as an item containing an error field; otherwise errors are thrown. A Kafka credential is required.

Links

Discussion