This page describes using settings in Lenses SQL Processors to process data in Kafka.
The SET syntax allows customizing the behaviour for the underlying Kafka Consumer/Producer, Kafka Streams (including RocksDB parameters), topic creation and error handling.
The general syntax is:
SQL processors can create topics that are not present. There are two levels of settings, generic (or default) applying to all target topics and specific (or topic-related) to allow distinct setups for a given topic. Maybe one of the output topics requires a different partition count or replication factor than the defaults.
To set the defaults follow this syntax:
All the keys applicable for defaults are valid for controlling the settings for a given topic. Controlling the settings for a specific topic can be done via:
The streaming engine allows users to define how errors are handled when writing to or reading from a topic.
Both sides can be set at once by doing:
or individually as described in the sections below.
Data being processed might be corrupted or not aligned with the topic format (maybe you expect an Avro payload but the raw bytes represent a JSON document). Setting what happens in these scenarios can be done like this:
While data is being written multiple errors can occur (maybe there were some network issues). Setting what happens in these scenarios can be done like this:
There are three possible values to control the behaviour.
When dlq
is used this setting is required. The value is the target topic where the problematic records will be sent to.
Using the SET syntax, the underlying Kafka Streams and Kafka Producer and Consumer settings can be adjusted.
\
Alongside the keys above, the Kafka consumer and producer settings can be also tweaked.
Some of the configurations for the consumer and producer have the same name. At times, maybe there is a requirement to distinguish them. To do that the keys have to be prefixed with: consumer or producer.
Stateful data flow applications might require, on rare occasions, some of the parameters for the underlying RocksDB to be tweaked.
To set the properties, use: