ASSOCIATE-CLOUD-ENGINEER · Question #89
You want to deploy an application on Cloud Run that processes messages from a Cloud Pub/Sub topic. You want to follow Google-recommended practices. What should you do?
The correct answer is C. 1. Create a service account.. You can use Pub/Sub to push messages to the endpoint of your Cloud Run service, where the messages are subsequently delivered to containers as HTTP requests. You cannot use Pub/Sub pull subscriptions because Cloud Run only allocates CPU during the processing of a request. https:/
Question
Options
- A
- Create a Cloud Function that uses a Cloud Pub/Sub trigger on that topic.
- B
- Grant the Pub/Sub Subscriber role to the service account used by Cloud Run.
- C
- Create a service account.
- D
- Deploy your application on Cloud Run on GKE with the connectivity set to Internal.
How the community answered
(25 responses)- A4% (1)
- B4% (1)
- C84% (21)
- D8% (2)
Explanation
You can use Pub/Sub to push messages to the endpoint of your Cloud Run service, where the messages are subsequently delivered to containers as HTTP requests. You cannot use Pub/Sub pull subscriptions because Cloud Run only allocates CPU during the processing of a request. https://cloud.google.com/run/docs/tutorials/pubsub#integrating-pubsub
Topics
Community Discussion
No community discussion yet for this question.