Poll mode blocks when no event present
Brought to you by:
justb
In poll mode, when the event-queue is empty, the thread is blocked waiting for an event. This is not the expected behaviour of poll mode.
The problem seems to be located in Subscriber.fetchEvent() line 236: deQueueAll() is called with a zero value. Then dequeueAll(), call the wait method with this previous value, blocking the thread forever.
A quick (and dirt) workarround is to initialize queueReadTimeoutMillis with 1 for example.
I attached a file with the blocked thread stack trace.
Blocked thread stack trace