add plugin support, rework message queue