store message into mongodb