0

I use ReplyingKafkaTemplate to send a request to Kafka and receive the reply. Consumer of the request is a C++ program. After processing the request, its reply is produced by the C++ application. Now my problem is about format of the reply, because it seems that consumer of the reply in spring-side uses correlation Id to find corresponding reply. Can somebody help me about this problem?

1 Answers1

0

You need to echo back the correlationId header so the template knows which request this reply is for. Simply set the header on the reply in your C++ code to the value of the incoming request header.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179