You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Maciej Wakula <Ma...@opuscapita.com> on 2021/10/15 07:06:53 UTC

How to use correlation ID?

Hello,

I would like to use Correlation ID in a microservices REST application but I am not sure how the value should be dealt with.

Let say user opened page example.com:80/register?email=name@example.com
The request received a correlationID="registerRequest:name@example.com" and was passed to microservice A, then to microservice B preserving correlationId.
Service B created a kafka message {id:"name@example.com"}​. Should it had correlationId="registerRequest:name@example.com" or rather a unique ID?

I understand that correlationId is meant to correlate kafka request and kafka response. However it is not clear to me if this should be any way bound to a larger meaning of "request handling" and its correlationId.

Thanks in advance for any responses :)
Regards