>what's the advantage of iterating over the entire queue when we really only want a subset

I was under the impression drain was called only for the last batch. My bad. Also, you rely on exception being thrown to let you know when there are no more elements in the queue. Can you do something like

int limit = Math.min(50, queue.size()) and use that as the bound in for loop.