0
0
GCPcloud~20 mins

Why messaging matters in GCP - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Messaging Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why use messaging services in cloud applications?

Imagine you have multiple parts of an app that need to talk to each other but work independently. Why is using a messaging service like Google Cloud Pub/Sub helpful?

AIt forces all parts to run at the same speed and wait for each other to finish tasks.
BIt allows parts to send messages without waiting for a reply, helping them work independently and handle traffic spikes.
CIt stores all data permanently like a database for later use.
DIt only works if all parts are running on the same machine.
Attempts:
2 left
💡 Hint

Think about how apps can keep working smoothly even if one part is slow or busy.

service_behavior
intermediate
2:00remaining
What happens if a subscriber fails to acknowledge a message in Pub/Sub?

In Google Cloud Pub/Sub, if a subscriber receives a message but does not acknowledge it, what will happen?

AThe subscriber will be blocked from receiving any more messages.
BThe message will be deleted immediately and lost forever.
CThe message will be sent to all other subscribers automatically.
DThe message will be redelivered after the acknowledgement deadline expires.
Attempts:
2 left
💡 Hint

Think about how Pub/Sub ensures messages are processed at least once.

Architecture
advanced
3:00remaining
Designing a scalable event-driven system with Pub/Sub

You want to build a system where many sensors send data to a cloud app that processes data in real-time and stores results. Which architecture best uses Pub/Sub to handle this?

ASensors publish messages to a Pub/Sub topic; multiple processing services subscribe and process messages independently; results are stored in a database.
BSensors write data directly to the database; processing services read from the database and update results.
CSensors send data to a single processing service that then publishes to Pub/Sub for storage.
DSensors send data to a message queue that only one service reads sequentially before storing.
Attempts:
2 left
💡 Hint

Think about how to handle many messages and scale processing easily.

security
advanced
2:30remaining
Securing Pub/Sub topics and subscriptions

Which practice best secures access to Pub/Sub topics and subscriptions in Google Cloud?

AStore credentials in code and share them with all team members.
BMake all topics and subscriptions public so anyone can publish or subscribe.
CUse IAM roles to grant least privilege access to only needed users and services.
DDisable authentication to simplify access during development.
Attempts:
2 left
💡 Hint

Think about controlling who can do what with your messaging resources.

Best Practice
expert
3:00remaining
Handling message ordering in Pub/Sub for critical workflows

You have a workflow where message order matters, but Pub/Sub does not guarantee order by default. What is the best way to ensure messages are processed in order?

AUse Pub/Sub message ordering keys and ensure subscribers process messages with the same key sequentially.
BUse multiple topics for each message type and process them in parallel without ordering.
CPublish all messages to the same topic without ordering keys and rely on subscriber speed.
DIgnore ordering and handle it later in the database after processing.
Attempts:
2 left
💡 Hint

Pub/Sub supports ordering keys to group messages that must be processed in order.