Add ability to write document to db being listened to.