core of message queue