0
0
GCPcloud~20 mins

Dead letter topics in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Dead Letter Topic Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Purpose of Dead Letter Topics in Pub/Sub

What is the main purpose of a dead letter topic in Google Cloud Pub/Sub?

ATo store messages that failed to be delivered after multiple attempts for later analysis or reprocessing.
BTo route all incoming messages to multiple subscribers simultaneously.
CTo automatically delete messages that are successfully processed to save storage space.
DTo encrypt messages before they are published to the main topic.
Attempts:
2 left
💡 Hint

Think about what happens to messages that cannot be processed properly.

Configuration
intermediate
2:00remaining
Configuring Dead Letter Topic in Pub/Sub Subscription

Which configuration snippet correctly sets a dead letter topic for a Pub/Sub subscription using gcloud CLI?

Agcloud pubsub subscriptions create my-sub --topic=my-topic --dead-letter-topic=my-dead-letter-topic --max-delivery-attempts=5
Bgcloud pubsub subscriptions create my-sub --topic=my-topic --dead-letter-topic=my-topic --max-delivery-attempts=5
Cgcloud pubsub subscriptions create my-sub --topic=my-topic --dead-letter-topic=my-dead-letter-topic
Dgcloud pubsub subscriptions create my-sub --topic=my-topic --max-delivery-attempts=5
Attempts:
2 left
💡 Hint

Remember to specify both the dead letter topic and max delivery attempts.

Architecture
advanced
2:30remaining
Designing a Reliable Message Processing System with Dead Letter Topics

You want to design a Pub/Sub system that processes messages reliably and handles failures gracefully. Which architecture best uses dead letter topics?

AUse multiple subscriptions on the main topic without dead letter topics, relying on automatic retries only.
BUse a main topic with a subscription that has a dead letter topic configured. Failed messages go to the dead letter topic for separate processing and alerting.
CSend all messages directly to a dead letter topic and process them immediately.
DUse a single subscription without dead letter topics and discard messages after one failed attempt.
Attempts:
2 left
💡 Hint

Consider how to separate failed messages for special handling.

security
advanced
2:00remaining
Permissions Required for Dead Letter Topics

Which IAM role must a Pub/Sub subscription have on the dead letter topic to successfully publish failed messages?

Aroles/pubsub.editor
Broles/pubsub.subscriber
Croles/pubsub.publisher
Droles/pubsub.viewer
Attempts:
2 left
💡 Hint

Think about what action the subscription performs on the dead letter topic.

service_behavior
expert
2:30remaining
Behavior of Message Delivery with Dead Letter Topics

Consider a Pub/Sub subscription with a dead letter topic configured and max delivery attempts set to 3. What happens when a message fails processing 3 times?

AThe message is sent to the dead letter topic only after the 4th failed attempt.
BThe message is retried indefinitely until acknowledged, ignoring the max delivery attempts.
CThe message is deleted silently after the 3rd failed attempt without being sent to the dead letter topic.
DThe message is sent to the dead letter topic after the 3rd failed attempt and is not redelivered to the subscription.
Attempts:
2 left
💡 Hint

Recall how max delivery attempts relate to dead letter topic delivery.