public int handle(ZLoop loop, PollItem item, Object arg_) {
LBBroker arg = (LBBroker)arg_;
ZMsg msg = ZMsg.recvMsg (arg.frontend);
if (msg != null) {
msg.wrap(arg.workers.poll());
msg.send(arg.backend);
// Cancel reader on frontend if we went from 1 to 0 workers
if (arg.workers.size() == 0) {
loop.removePoller (new PollItem (arg.frontend, 0));