Hello,
I have multiple microservices. My workflow is hosted by Microservice1.
This is what my workflow looks like -
- Activity 1 - Calls Microservice2 that can take a long time to return result
- Activity 2 - Can only proceed when Activity1 is successful. After that, it needs to communicate with Microservice3. This service gets a lot of requests from different services and needs to process the requests in order.
- Activity 3 - Updates the DB with with the result from Activity2
What would be the most effective way to implement these activities?
Since Microservice3 needs to process requests in order, does it make sense to put a message in a Kafka queue? If so, what’s the best way to get a response back? Through a signal or a response in the Kafka queue as well?
Should these activities (Activity1 and Activity2) be asynchronous activities waiting for a Future to return as they are long running?
Thanks!