basic pub sub support

I badly need this feature now but not sure if this is how you would like it to be implemented  - please review.