GCP ACE · Question 26 · Domain 3.3: Deploying Cloud Run and Cloud Functions
You are writing a Cloud Function that needs to process messages as soon as they are published to a Cloud Pub/Sub topic named order-events.
How should you configure the Cloud Function to achieve this?
Answer options:
Deploy the function with an Eventarc trigger (or --trigger-topic) pointing to the Pub/Sub topic.
Deploy the function with an HTTP trigger and configure Pub/Sub to send a webhook to the URL.
Use Cloud Scheduler to trigger the function every minute to pull messages from the topic.
Write a loop inside the Cloud Function that continuously polls the Pub/Sub topic.
50 questions · hints · full answers · grading