Example publish with sync and async subscribe.