Skip to main content

Associate Cloud Engineer practice question · Ensuring the successful operation of a cloud solution

A Pub/Sub subscriber can't process a small number of malformed messages.

A Pub/Sub subscriber can't process a small number of malformed messages. Pub/Sub keeps redelivering these messages until they reach the end of the subscription's retention period, which wastes subscriber capacity, and the team can't easily inspect them. The team wants messages that fail repeatedly to be moved aside automatically for later investigation. What should they configure on the subscription?

  • AA dead-letter topic with a maximum number of delivery attempts
  • BA longer acknowledgment deadline, raised to its maximum of 600 seconds
  • CA retry policy that uses exponential backoff between redeliveries
  • DExactly-once delivery, so each message is redelivered only once
Show the answer and explanation

Correct answer: A) A dead-letter topic with a maximum number of delivery attempts

A dead-letter topic with a maximum delivery attempt count moves repeatedly failing messages out of a subscription for investigation. Without one, Pub/Sub keeps retrying unacknowledged messages until they expire.

Why each option is right or wrong

  • A) Correct. With a dead-letter policy, Pub/Sub forwards a message to the dead-letter topic once it has failed roughly the configured number of delivery attempts (5 to 100, default 5). The failing message leaves the main subscription and is kept somewhere it can be inspected. The Pub/Sub service agent needs permission to publish to the dead-letter topic and to subscribe to the source subscription.
  • B) Incorrect. A longer ack deadline only gives the subscriber more time before Pub/Sub redelivers. A malformed message still fails every time and is never moved aside.
  • C) Incorrect. Exponential backoff spaces out redelivery attempts, but the failing message stays on the subscription until it expires. It isn't isolated for investigation.
  • D) Incorrect. Exactly-once delivery stops a message from being redelivered after it has been acknowledged successfully. It doesn't cap redeliveries of unacknowledged messages and doesn't move failed messages anywhere.
Exam domain
Ensuring the successful operation of a cloud solution · ~30% of Associate Cloud Engineer
Question type
Multiple choice (one answer)

Practise the full Associate Cloud Engineer exam

This question is one of a small free sample from the CertRidge Associate Cloud Engineer bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with Google Cloud; never copied from the real exam.