Currently I am developing a project based on a microservice architecture and the idea is that each microservice is with Spring Boot and communication with them is through Apache Kafka. You want to expose a REST API so that the Frontend consumes the information.
The problem I have to perform the REST API is to uniquely identify each request when using Apache Kafka, that is, imagine the following scenario:
/usuarios/:id
to retrieve the information of a user with the ID as parameter /usuarios/1
The question is, how can I respond from Kafka so that the client's request with the information requested can be completed?
I searched for examples with Spring Boot and found this link
But he does not focus on making a response from the microservice with Kafka.