Disruptor Consumer check available sequence

I'm using Disruptor for my multi-thread app and now I have a use case where for my consumer of ringbuffer, I don't want it to wait. I just want to check if there's sequence available to be consumed. If there is, I will consume, otherwise move on. However, everything I see so far is waitFor something which blocks.. whereas for publisher, we have tryNext that doesn't wait if it can't publish. Is there an equivalent for consumer? I don't want to hack it with Alert/TimeoutException, etc..


Read More »

By: StackOverFlow - 7 days ago

Related Posts