added publishing and subscribing

Added 2 methods
1. User subscribes to a topic
2. User publishing message to a topic