Google ACE Planning and Configuring a Cloud Solution Practice Question
A developer is deploying a Cloud Function that processes messages from a Pub/Sub topic. The function takes 10 minutes to complete each message. The developer needs to ensure that messages are not lost if the function fails. Which Cloud Function generation and configuration should they use?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Cloud Functions (2nd gen) with an event-driven trigger from Pub/Sub and retry on failure
Cloud Functions (2nd gen) supports longer timeouts (up to 60 minutes) and event-driven triggers like Pub/Sub with retries. 1st gen has a max timeout of 9 minutes. Retry on failure is configured in the subscription. Background functions are 1st gen.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Cloud Functions (2nd gen) with an event-driven trigger from Pub/Sub and retry on failure
Why this is correct
Cloud Functions (2nd gen) with an event-driven trigger from Pub/Sub and retry on failure is correct because 2nd gen functions are built on Eventarc and Cloud Run, which natively subscribe to Pub/Sub topics and invoke the function asynchronously when messages arrive. The 2nd gen runtime supports a maximum timeout of 60 minutes, comfortably covering the 10-minute processing window, and when combined with a retry policy, transient failures will cause the message to be redelivered without hitting a timeout ceiling.
- ✗
Cloud Functions (1st gen) with an HTTP trigger and a Pub/Sub push subscription
Why it's wrong here
This option uses a 1st gen HTTP trigger with a Pub/Sub push subscription, which does allow messages to reach the function as HTTP POST requests, but the fundamental problem is the 1st gen HTTP function timeout is capped at 9 minutes. Because the processing takes 10 minutes, the function execution will be forcibly terminated regardless of the push subscription's own retry mechanisms; the push subscription only redelivers the message, it cannot extend the function's execution time, so every retry will also time out and fail.
- ✗
Cloud Functions (2nd gen) with an HTTP trigger
Why it's wrong here
A 2nd gen HTTP trigger is not wired to Pub/Sub in an event-driven manner; HTTP functions are invoked by direct HTTP requests, not by Pub/Sub message delivery. To automatically process Pub/Sub messages, the function needs an Eventarc trigger that listens to the Pub/Sub topic and sends the event to the function's event-driven endpoint—an HTTP trigger would require you to manually create a push subscription or write custom polling logic, which is not the native, managed integration Cloud Functions provides for Pub/Sub.
- ✗
Cloud Functions (1st gen) with a background function and retry on failure
Why it's wrong here
A 1st gen background function with retry enabled still carries the 1st gen maximum timeout of 9 minutes, which is less than the required 10-minute processing time. Retry does not reset or extend the execution deadline; it simply re-invokes the function after a failure, so each attempt will again time out at 9 minutes and continue to fail indefinitely. Background functions in 1st gen also use the same underlying infrastructure as App Engine, which enforces this strict timeout, making the option unsuitable regardless of the retry policy.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
Learn chapter
Google Cloud Platform Overview
Key term
Pub/Sub
Pub/Sub is a messaging pattern where publishers send messages without knowing who receives them, and subscribers receive only the messages they care about.
Key term
Cloud Functions
Cloud Functions are serverless compute services that let you run single-purpose code in response to events without managing servers.
About these practice questions
This ACE question is part of Courseiva's 769-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.