Skip to main content
Version: Current

Kafka (Sink)

Mode: Streaming

Description

Kafka topics are a common streaming output from Nussknacker scenarios. You need to define Kafka integration to make Kafka source and sink components available in the Component Palette. Check Kafka Integration page for the list of available Kafka or Kafka compatible integrations and integration set up information.

Parameters and configuration

NameDescription
Topic nameKafka topic to write to
VersionSchema version
KeyPartitioning key used to distribute events among topic partitions
Raw editorSet to true If you want to write the whole output message as one expression
Validation modeSee below

When using the Raw editor, you can choose the validation mode:

  • strict - requires providing all fields, including optional fields, without redundant fields;
  • lax - requires providing only required fields, you can skip optional fields and add redundant fields.   If no schema for the topic is found in the Schema Registry, the expression for the sink Kafka message can be created using Raw editor only. No validation will be applied to the content of the Kafka message.

Additional considerations

Event time

In general following rules apply:

Schema registry and its role

When writing to the sink, if Schema Registry contains schema for your topic, Nussknacker will be able to help with field names and data type related validation of SpEL expressions, You can find some more details on schemas here.