I have 3 processors running parallel I want to wait untill all have finished their jobs. All 3 processors will put the message in kafka topic once they finish their job. And once all have finished I want to trigger the next job. For this I explored the possible options like below.
- Use wait-notify. wait after all 3 processors and then notify for the next job
- Put each processors status in DistributedMapCache then on every put message in kafka topic check this cache and all 3 processors status is done then trigger next job
- write some poller who will keep on polling these 3 processors and trigger next jobs
What is the best way to achieve the same?