program spqueue;////Simple Pirate broker//This is identical to load-balancing pattern, with no reliability//mechanisms. It depends on the client for recovery. Runs forever.//@author Varga Balazs <moc.liamg|agrav.bb#moc.liamg|agrav.bb>//{$APPTYPE CONSOLE}

//The body of this example is exactly the same as lbbroker2.whilenot ctx.Terminated dotry//Poll frontend only if we have available workersif workers.size >0thenpc :=2elsepc :=1;poller.poll( 1000, pc );