add pubsub support
Merge pull request #4 from juliangruber/pubsub

add pubsub support