I need to process a request record in kafka-stream and also need to tell the sender the response of the processing. I created a Rest endpoint to receive the request. This endpoint uses spring-kafka's ReplyingKafkaTemplate, which sends request on a topic and wait for response on another topic. correlation id header is used to correlate the request and response.
How can I set the correlation id header in the response record in my kafka-stream code is sending after processing the request record?