I would like some advices on how to solve a problem of grouping items that are fetched from a queue. I will try to simplify the problem as much as possible by removing all unnec