Kafka integration between two micro service which can respond back to the same function initiated the request

23 Views Asked by At

Suppose if we have two micro services communicating using spring Rest Template call and they are exchanging the request and response respectively.Now if I want to use the Kafka in between them to increase throughput. Is it possible to achieve this scenario?

I am able to publish the object as string and produce in Kafka and that is getting listened by the consumer. Now the consumed data is getting processed and sent to the different topic. Now the response should get return in the same function by which the message was produced and published. Is it possible to achieve this using spring Kafka.

How to achieve using request-response pattern.

0

There are 0 best solutions below