The Google Cloud PubSub guide on pull subscriptions uses Subscriber
to consume messages from a subscription. However, SubscriptionAdminClient
also has a pull
method . The latter is not explored in the guides.
They both work, but is one (likely the former) recommended over the other?
The pull method in SubscriptionAdminClient
is really only exposed because it is part of the auto-generated library. Whenever possible, it is best to use the Subscriber
library, which is a hand-written library designed to optimize for high throughput and low latency. The pull
method is covered in the documentation , though accessed in a slight different way.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.