I have a microservice(Microservice A) which connects to a Client MQ and recieves messages and persists into the database.(Synchronous type MessageA after Message B for the same order). Internally i have n microservices each handling a particular type of message based on some message parameters. All the microservices are independent of each other and can perform processing using the data from Message(Which is persisted in Database -Get RestAPI operation).
However MessageB from the MQ needs to processed only when MessageA has finished its complete processing.(Synchronous). But each message can call N microservices to perform its tasks which can be asynchronous *(Async) in nature.
How can i bring about synchronization between the message processing of parent w.r.t the child (Async tasks). i.e Message A -> 4 tasks(Async microservice) -> calls 4 microservices completes work and processes Message B -4 tasks?