use db to store message

use db to store message