MessageQueue class