save message in db