I would like to pull messages from a RabbitMQ queue, wrap them in a object and dispatch for some kind of processing. Ofcourse I could iteratively do that until the queue is empty, but I was wondering if there is any other way (some flag of some kind) or a neater way.
RabbitMQ does not support batches of messages, so you do indeed need to consume each message individually. 
Maybe an alternative would be to batch the messages yourself by publishing one large message with all the required content.
Is it possible to pull all messages from a RabbitMQ queue at once?