Jump to: navigation, search

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.

Important
If the Kafka Capture Point option copy-original-headers-in-reply is set to true, the order of the CorrelationID header in the list of all headers copied from the inbound request to the outbound reply is preserved.

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.

This page was last edited on June 18, 2020, at 10:43.
Comments or questions about this documentation? Contact us for support!