Sending HTTP response after consuming a Kafka topic

后端 未结 2 1778
野的像风
野的像风 2021-01-07 06:59

I’m currently writing a web application that has a bunch of microservices. I’m currently exploring how to properly communicate between all these services and I’ve decided to

2条回答
  •  执笔经年
    2021-01-07 07:31

    Do you have an option to create more endpoints in the gateway?

    I would have the POST endpoint dedicated just for producing the message to the Kafka queue, which the other microservice will consume. And as a returned object from the endpoint, it'll contain some sort of reference or id to get the status of the message.

    And create another GET endpoint in the gateway where you can retrieve the status of the message with the reference of the message you got when you created it.

提交回复
热议问题