Question
Amazon
US
Last activity: 5 May 2021 17:00 EDT
Kafka integration - Any way to add headers to message?
Kafka 0.11 introduced the concept of record headers.
In Pega, I don't see any way to add such headers. Any suggestion on how it can be achieved? Is it even feasible?
Here is a sample Java code (reference Top 5 Things Every Apache Kafka Developer Should Know (confluent.io)):
ProducerRecord<String, String> producerRecord = new ProducerRecord<>("bizops", "value"); producerRecord.headers().add("client-id", "2334".getBytes(StandardCharsets.UTF_8)); producerRecord.headers().add("data-file", "incoming-data.txt".getBytes(StandardCharsets.UTF_8)); producer.send(producerRecord);
Thanks