Keep track of subscription even before pub/sub is connected

Also, we never want to emit a message if we've unsubscribed
Add basic examples of a producer and consumer