messages are written to DB