0
0
GCPcloud~30 mins

Why messaging matters in GCP - See It in Action

Choose your learning style9 modes available
Why messaging matters
📖 Scenario: You are working on a cloud application that needs to send messages between different parts of the system reliably. Messaging helps different services talk to each other without losing information.
🎯 Goal: Build a simple Google Cloud Pub/Sub setup with a topic and a subscription to understand how messaging works in cloud infrastructure.
📋 What You'll Learn
Create a Pub/Sub topic named my-topic
Create a subscription named my-subscription to my-topic
Configure the subscription to use pull delivery type
Ensure the setup follows Google Cloud best practices for messaging
💡 Why This Matters
🌍 Real World
Messaging systems like Pub/Sub help cloud services communicate reliably without losing messages, even if parts of the system are busy or offline.
💼 Career
Understanding messaging is key for cloud architects and developers to build scalable, decoupled applications that handle data and events efficiently.
Progress0 / 4 steps
1
Create a Pub/Sub topic
Create a Pub/Sub topic named my-topic using the Google Cloud SDK command gcloud pubsub topics create my-topic.
GCP
Need a hint?

Use the gcloud pubsub topics create command followed by the topic name.

2
Create a subscription to the topic
Create a subscription named my-subscription to the topic my-topic using the command gcloud pubsub subscriptions create my-subscription --topic=my-topic --ack-deadline=10.
GCP
Need a hint?

Use gcloud pubsub subscriptions create with the --topic flag to link the subscription.

3
Configure subscription for pull delivery
Ensure the subscription my-subscription is configured for pull delivery by adding the flag --message-retention-duration=600s to the subscription creation command.
GCP
Need a hint?

Add --message-retention-duration=600s to keep messages for 10 minutes.

4
Verify the Pub/Sub setup
List the topics and subscriptions to verify that my-topic and my-subscription exist using gcloud pubsub topics list and gcloud pubsub subscriptions list.
GCP
Need a hint?

Use gcloud pubsub topics list and gcloud pubsub subscriptions list to check your setup.