Add headers for message

Hello,

Is it possible to add kafka RecordHeader for source connectors ?
For example il will add document key and cas for each document.

Thank’s
Samir

Hi Samir,

This is not something the connector supports directly, but you can add headers by applying a Single Message Transform (SMT). I’m not sure if the built-in transforms proposed in KIP-145 ever made it into Kafka; you might have to write your own.

You can use this example project as a starting point for writing your own SMT. You’ll need to update the kafka.version property in the POM to version 1.1.0 or later, since that’s when header support was added to Kafka Connect.

Thanks,
David