Capgemini interview question

How do you filter out messages from a queue?