Courseiva
Question 339 of 964

Pub/Sub At-Least-Once Delivery

A developer is building a Cloud Pub/Sub-based event-driven system. They need to ensure that messages are processed at least once, and they want to handle processing failures. What should they do?

Quick Answer

The correct choice is to use push subscriptions with a dead-letter topic. This configuration ensures at-least-once delivery because Cloud Pub/Sub will automatically retry pushing a message if the subscriber endpoint returns an error, and only after exhausting the maximum delivery attempts—defaulting to five—does the system forward the undelivered message to a dead-letter topic for later analysis or reprocessing. This guarantees that no message is silently lost; it is either successfully processed or preserved for manual intervention, directly satisfying the at-least-once requirement. On the Google Professional Cloud Developer exam, this scenario tests your understanding of how Pub/Sub’s retry mechanism and dead-lettering work together to handle processing failures without dropping data. A common trap is assuming a pull subscription with manual acknowledgment alone provides the same guarantee, but without a dead-letter topic, messages that repeatedly fail can be lost if the subscriber stops acknowledging them. Memory tip: think “push, retry, then dead-letter” as the three-step safety net for at-least-once delivery.

⚠ Common exam trap

The PCD exam often tests the misconception that simply increasing delivery attempts (Option B) is sufficient for failure handling, but the trap is that without a dead-letter topic, messages are permanently lost after the final attempt, violating the at-least-once requirement.

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

Use push subscriptions with a dead-letter topic

Using push subscriptions with a dead-letter topic ensures at-least-once delivery and provides a mechanism to handle processing failures. When a push subscription fails to deliver a message (e.g., due to a downstream error), Pub/Sub automatically retries delivery. After exhausting the maximum delivery attempts (default 5), the message is forwarded to a dead-letter topic, where it can be analyzed or reprocessed without losing the message. This guarantees that every message is either processed successfully or stored for manual intervention, satisfying the at-least-once requirement.

Answer analysis

Option-by-option breakdown

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

  • Use pull subscriptions with auto-acknowledgment

    Why it's wrong here

    Auto-acknowledgment may lose messages if processing fails.

  • Configure max delivery attempts on the subscription

    Why it's wrong here

    This alone doesn't handle messages after max attempts; a dead-letter topic is needed.

  • Use Cloud Tasks instead of Pub/Sub

    Why it's wrong here

    Cloud Tasks is for distributed task queues, not event streaming.

  • Use push subscriptions with a dead-letter topic

    Why this is correct

    Push subscriptions with a dead-letter topic provide retries and failure handling.

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

Same concept, more angles

1 more way this is tested on PCD

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A developer is building an event-driven system using Cloud Pub/Sub. They need to ensure reliable message delivery and processing. Which three practices should they follow?

medium
  • A.Set a minimum number of delivery attempts.
  • B.Use pull subscriptions with synchronous acknowledgment.
  • C.Use message ordering.
  • D.Configure a dead-letter topic.
  • E.Use exponential backoff for pull subscriptions.

Why B: Pull subscriptions with synchronous acknowledgment (option B) ensure that a message is not acknowledged until the subscriber has successfully processed it. This prevents premature acknowledgment and message loss, because Cloud Pub/Sub will redeliver the message if the acknowledgment deadline expires without a synchronous ack. This is a core pattern for reliable processing.

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.