Courseiva

PDE Designing Data Processing Systems Practice Question

A company uses Cloud Pub/Sub for event ingestion. They want to ensure that if a subscriber fails to process a message after 5 attempts, the message is sent to a dead letter topic for analysis. Which TWO configurations are needed?

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

✓

Set max delivery attempts to 5 on the subscription.

Option A is correct because Pub/Sub's dead letter policy requires you to specify a maxDeliveryAttempts value on the subscription; setting it to 5 ensures the message is forwarded to the dead letter topic after exactly 5 failed delivery attempts. Option D is correct because a dead letter policy only takes effect when a separate dead letter topic exists and is attached to the subscription via the deadLetterPolicy.deadLetterTopic field, which is where unprocessable messages are published for analysis. Option B is not needed because the ack deadline (e.g., 600 seconds) controls how long a subscriber has to acknowledge a message before redelivery, not the number of attempts before dead-lettering. Option C is unrelated because message ordering only preserves publish order for ordering keys and does not trigger dead-letter routing. Option E is incorrect because push versus pull is a delivery mode choice and has no bearing on the dead letter policy, which works with either subscription type.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Set max delivery attempts to 5 on the subscription.

    Why this is correct

    Setting max delivery attempts to 5 on the subscription triggers dead-lettering once a message exceeds that threshold. Cloud Pub/Sub requires both this retry limit and a dead letter topic on the same subscription; without the limit, failed messages retry indefinitely, so this satisfies the "after 5 attempts" constraint in the stem.

  • ✗

    Set the subscription's ack deadline to 600 seconds.

    Why it's wrong here

    The ack deadline controls how long Pub/Sub waits for acknowledgement before redelivering; it does not count delivery attempts or route messages. Dead-lettering requires a dead_letter_policy with max_delivery_attempts and a dead letter topic on the subscription. Extending the deadline merely delays redelivery, so failed messages loop indefinitely.

  • ✗

    Enable message ordering on the subscription.

    Why it's wrong here

    Message ordering guarantees ordered delivery within an ordering key; it neither counts delivery attempts nor routes failed messages. It is tempting because ordering and dead-lettering are both subscription settings, but the required pair is a dead letter topic plus a maximum delivery attempt count of five.

  • ✓

    Create a dead letter topic and attach it to the subscription.

    Why this is correct

    A dead letter topic must exist and be attached to the subscription via a dead letter policy, which is what actually redirects messages after the delivery attempt limit is exceeded. Without this attachment, failed messages are simply dropped.

  • ✗

    Set the subscription type to push.

    Why it's wrong here

    Push versus pull governs how subscribers receive messages, not how failed deliveries are retried or redirected. It is tempting because push subscriptions are common for event ingestion, but dead-lettering works with either delivery type; the required settings are a dead letter topic and a maximum delivery attempt count.

About these practice questions

This PDE question is part of Courseiva's 747-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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