Message retention and acknowledgment
📖 Scenario: You are setting up a Google Cloud Pub/Sub topic and subscription for a simple messaging system. You want to control how long messages are kept and ensure messages are acknowledged properly to avoid duplicates.
🎯 Goal: Build a Pub/Sub topic and subscription with a message retention duration of 7 days and configure the subscription to require explicit message acknowledgment.
📋 What You'll Learn
Create a Pub/Sub topic named
my-topicCreate a Pub/Sub subscription named
my-subscription attached to my-topicSet the message retention duration of the topic to 7 days
Configure the subscription to require explicit acknowledgment of messages
💡 Why This Matters
🌍 Real World
Message retention and acknowledgment settings are crucial for reliable message processing in distributed systems, ensuring no messages are lost or processed multiple times.
💼 Career
Understanding Pub/Sub configuration is important for cloud engineers and developers working with event-driven architectures and asynchronous communication.
Progress0 / 4 steps