synchronized pub-sub guide example