Max says "block here until a new message is received. "
Fine for processing one queue, but not acceptable for polling multiple queues.
For multiple queues you want to quickly see I there is a message waiting.
Also note that if a message is received on a given queue you might want to loop on that queue until all messages are received rather than polling the next queue.
Do until no more messages
Receive queue1 wait 0
end
do until no more messages
Receive q2 wait 0
end
etc
delay
goto top
while msgid <> '