client side api skeleton. xmq sends two kind of messages