Question 450 of 500
Building and testing applicationseasyMultiple ChoiceObjective-mapped

Quick Answer

The answer is to enable retry on failure for the Pub/Sub subscription. This is the most likely cause because when a Cloud Function fails to process a message—even if the code handles errors gracefully—the function may still return a non-zero exit status, causing the message to be nacked. Without retry on failure configured, the subscription will eventually drop unacknowledged messages after exhausting its default delivery attempts, leaving them visible in the subscription but never invoking the function. On the Google Professional Cloud Developer exam, this scenario tests your understanding of the Pub/Sub delivery mechanism versus Cloud Function invocation logs; a common trap is assuming that graceful error handling in code automatically triggers retries. Remember that Pub/Sub retry behavior is controlled at the subscription level, not the function code. Memory tip: “No retry, no retry—messages die in the queue.”

PCD Building and testing applications Practice Question

This PCD practice question tests your understanding of building and testing applications. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A developer deployed a Cloud Function that is triggered by a Pub/Sub topic. The function processes messages and writes results to a BigQuery table. The developer notices that some messages are not being processed; they are visible in the Pub/Sub subscription but the function logs show no invocation for those messages. The function's code is correct and handles errors gracefully. What is the most likely cause and fix?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1easymultiple choice
Full question →

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

Enable retry on failure for the Pub/Sub subscription.

Option D is correct because the Pub/Sub subscription has a default 'ack deadline' and if the Cloud Function does not acknowledge the message within that time (or if the function fails to process it and the subscription is not configured to retry), the message may be redelivered but eventually dropped. Enabling retry on failure ensures that messages that cause the function to fail (even if the code handles errors gracefully, the function might still return an error status) are retried until successfully processed.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Increase the function timeout to 540 seconds.

    Why it's wrong here

    Increasing timeout addresses slow processing but not the lack of invocations.

  • Check that the Pub/Sub subscription push endpoint is set to the Cloud Function URL.

    Why it's wrong here

    The subscription is likely correctly configured since some messages are processed.

  • Increase the function memory to 2GB.

    Why it's wrong here

    Memory increase may help with resource issues but not if the function is not being invoked.

  • Enable retry on failure for the Pub/Sub subscription.

    Why this is correct

    If the function fails without returning success, the message may be lost. Retry ensures it is reprocessed.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Cisco often tests the misconception that increasing timeout or memory solves invocation issues, when the real problem is that the function is not being triggered due to missing retry configuration or ack deadline expiry.

Detailed technical explanation

How to think about this question

Under the hood, Pub/Sub uses a 'push' delivery mechanism to the Cloud Function's HTTP endpoint. If the function returns an HTTP 200 status, the message is acknowledged; otherwise, it is retried based on the subscription's retry policy. By default, subscriptions have a 'retry after' duration but no exponential backoff or maximum retry count, so messages can be dropped after a few attempts if the function consistently fails. Enabling retry on failure (with exponential backoff) ensures messages are retried indefinitely until they expire (default 7 days).

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCD practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCD practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCD question test?

Building and testing applications — This question tests Building and testing applications — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Enable retry on failure for the Pub/Sub subscription. — Option D is correct because the Pub/Sub subscription has a default 'ack deadline' and if the Cloud Function does not acknowledge the message within that time (or if the function fails to process it and the subscription is not configured to retry), the message may be redelivered but eventually dropped. Enabling retry on failure ensures that messages that cause the function to fail (even if the code handles errors gracefully, the function might still return an error status) are retried until successfully processed.

What should I do if I get this PCD question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCD 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 PCD exam.