update pubsub sample