PCD Integrating Google Cloud services

A Pub/Sub push subscription delivers messages to a Cloud Run service, and the service returns HTTP 500 for some of them. What happens to those messages?

Show answer and explanation

Answer: A

A push endpoint that answers with anything other than a success status leaves the message unacknowledged. Pub/Sub then redelivers it using an exponential backoff retry policy. The message is kept until it is acknowledged or the subscription's message retention window ends. A dead-letter topic can capture a message after a maximum number of delivery attempts. The acknowledgment deadline only sets how long each attempt may take, so it does not limit the total retry lifetime.

Why the other options are wrong

  • B. A single failed response does not discard the message. Pub/Sub treats the delivery as unacknowledged and schedules another attempt, so messages are not lost on the first failure.
  • C. Logging is not part of Pub/Sub's delivery path, and failed messages are not parked there. Delivery continues to be retried until acknowledgment or expiry, with optional dead-lettering.
  • D. Subscriptions are not removed because of endpoint errors. A failing endpoint only causes retries and backoff, and the subscription stays in place until someone deletes it.

Keep going. 135 PCD questions, answers explained after each one.

Practise this domain

Reviewed November 2026. Spotted a problem with this question? Report it from the practice tool.