Easy to reproduce:
public void test() throws Exception
for (int i = 0; i < 1000000; i++)
log.info("** ITER "+ i);
There are a few issues with your fix for this JIRA:
1) The stopping flag is not volatile, so threads may cache stale values
2) The stop() method should only exit when the bridge is no longer doing anything. Right now the bridge continues processing after stop has executed.
i'll fix it
Your latest fix is ugly and prone to more race conditions.
Having separate threads for each handler is unnecessary.
Just have the bridge maintain a single thread executor and all the actions use that.
Then when you want to stop(), simply set the stopping flag, add a future to the executor and wait completion, no need for interrupts().
This is the clean way to do it.