Capgemini Interview Question

How do you filter out messages from a queue?