Implementation of MessageQueue

Implementation of MessageQueue