Adds message to write to database.