Question

2
Replies
64
Views
Shrikant Pustode (shrikantbp)
Standard & Poor's
Lead I
Standard & Poor's
US
shrikantbp Member since 2014 23 posts
Standard & Poor's
Posted: February 8, 2021
Last activity: May 5, 2021
Posted: 8 Feb 2021 16:23 EST
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

***Edited by Moderator Marissa to update Platform Capability tags****
Pega Platform 8.4.1 Pega Platform User Experience Data Integration Decision Management