How to process the individual rows from the collection, then go back to first stage for next record. If there is no records, First stage should get the next queue item

Hope your query resolved !