Our application consists of microservices. In my side, before deleting an something, it may be used in another microservice . Therefore I need to ask another microservice that the something is used in your side. To do that, I send an event with spring-cloud-event-bus and I need to wait until the response is coming so I cannot return any response tu UI. Also, I can take response in an listener class. How can I forward the message to controler. How can I manage the process.
I have an idea but i think it is not sensible, When a delete request comes, I send an event to another microservice and I am waiting to response. I save the response of other microservice to mongodb with the id of object which will be deleted. By the way, controller is checked the database to getting the response