Topic (Sink)
Description
Topic Sink allows to write data to a Kafka topic managed by Nussknacker - one of the topics listed on the Topics page ("internal topics"). You can use internal Kafka topics to:
- route data between scenarios
- send events to a topic via public HTTPS or WebSocket endpoint
- receive results via HTTP callback, WebSocket subscription, or by pulling them from the HTTP API
To connect Nussknacker to your own Kafka cluster, see Kafka Integrations.
Create and manage topics, with their schemas, on the Topics page (the Topics item of the Designer side menu). While editing the node, you can also click Create New Topic next to the Topic name parameter: it creates a topic with a random name and no schema, and puts its name into the parameter.
Parameters and configuration
| Name | Description |
|---|---|
| Topic name | Kafka topic to write to |
| Schema version | Version of the topic's schema (from the schema registry) used to validate and serialize the written value. Latest version resolves to the newest version every time the scenario is validated and deployed, so a new version is picked up on the next deployment. Shown only for topics with a schema; for a topic without a schema, the Content type parameter (JSON or PLAIN) is shown instead. |
| Key | Partitioning key used to distribute events among topic partitions |
| Raw editor | Set to true if you want to write the whole output message as one expression (Value); otherwise each field of the topic's schema gets its own parameter |
| Value validation mode | With the Raw editor: Strict mode requires all fields, optional ones included, and no extra fields; Lax mode requires only the required fields and accepts extra ones. See validation modes |
| Value | With the Raw editor: the whole message, as one expression |