Ensure that each Google Cloud Pub/Sub subscription is configured to use a dead-letter topic, also known as dead-letter queue, in order to capture undeliverable messages. Your Pub/Sub subscriptions are configured with a maximum number of delivery attempts. When a message cannot be delivered, it is republished to the specified dead-letter topic.
excellence
When a message can't be acknowledged, Google Cloud Pub/Sub service can forward the message to a dead-letter topic that stores the message for later access. Configuring dead-letter topics (queues) for your Pub/Sub subscriptions can make your cloud applications more resilient and durable by capturing and storing messages that can't be delivered due to client errors or server errors for further analysis or reprocessing.
Audit
To determine if dead lettering is enabled for all your Pub/Sub subscriptions, perform the following operations:
Remediation / Resolution
To enable and configure dead lettering for your Google Cloud Pub/Sub subscriptions, perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- Pub/Sub
- Forwarding to dead-letter topics
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud pubsub subscriptions list
- gcloud pubsub subscriptions describe
- gcloud pubsub subscriptions add-iam-policy-binding
- gcloud pubsub subscriptions create
- gcloud pubsub subscriptions update
- gcloud pubsub topics create
- gcloud pubsub topics add-iam-policy-binding