store messages in MongoDB