Wanted to check if thread barrier is the right way to go about solving a problem where you have to poll the DB continuously 2-3 times in specific time intervals for incoming events checking for a trigger and then, eventually timeout in a Spring Integration project.
Also, do we always need 2 threads for thread barrier to work? The suspended thread and the trigger thread.