Created publisher adapter

this can probably be wrapped in a promise.