You say this but you did not give many clues as to what your thought actually is. I keep prodding but I'm getting nothing back except for those "no obviously I wouldn't do that".
Will you actually describe your thought or does it not fit in the margin of your comment?
You have a list of queue groups. You write code to round robin through them. Each time, you see if there is a job to be processed for that group. If there is, process it. If there's not, move to the next group in the list.
Will you actually describe your thought or does it not fit in the margin of your comment?