Kafka Capture Point - Matching Requests and Replies
Unlike JMS, which supports MessageID and CorrelationID message properties for request and reply matching, Kafka does not provide any built-in means for this goal. Thus, Kafka Capture Point uses its own convention to allow matching outbound replies for the inbound requests.
Kafka Capture Point adds header MessageID to each outbound reply. Its value is the string representation of index of partition and offset of the inbound message separated with a dot. That is, if an inbound message is received from partition 6 with offset 20451, then the value of the MessageID header of the reply is 6.20451.
Though MessageID uniquely identifies an inbound request, it is not always convenient. Thus, Kafka Capture Point reads the value of the first CorrelationID header of the inbound request and sends it back in the CorrelationID header of the reply. The name of the header used for reading correlation ID can be configured in the Kafka Capture Point option correlation-id-header-key. By default, it is CorrelationID.
This approach effectively emulates the JMS message properties MessageID and CorrelationID.
This behavior applies to all outbound messages sent in reply to inbound requests including messages sent to the notification, processed, and error topics.