Search code examples
google-cloud-pubsubgoogle-python-api

Does Google PubSub support synchronous pull for its Python API?


The documentation I have read has only covered asynchronous pull - I'd like to verify that that is the only option for the Python API.


Solution

  • The Cloud Pub/Sub client library only support asynchronous subscribing, which is the recommended way to run a subscriber. For specific use cases where a synchronous pull is needed, use the REST/HTTP pull method or the gRPC pull method, which requires generating the service code.