0
0
GCPcloud~20 mins

Pub/Sub vs Cloud Tasks in GCP - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Pub/Sub vs Cloud Tasks Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Pub/Sub Message Delivery

Which statement best describes how Google Cloud Pub/Sub handles message delivery?

APub/Sub guarantees exactly-once delivery of messages to subscribers.
BPub/Sub guarantees at-least-once delivery, so messages may be delivered more than once.
CPub/Sub delivers messages only once and drops duplicates automatically.
DPub/Sub does not retry message delivery if a subscriber fails to acknowledge.
Attempts:
2 left
💡 Hint

Think about how Pub/Sub ensures messages are not lost but might be repeated.

Architecture
intermediate
2:00remaining
Choosing Between Pub/Sub and Cloud Tasks for Task Execution

You need to design a system that processes user requests with guaranteed execution and ordered processing. Which service is more suitable?

AUse Pub/Sub because it guarantees ordered message processing and exactly-once delivery.
BUse Cloud Tasks because it supports task scheduling, retries, and ordered execution.
CUse Pub/Sub because it supports task scheduling and delayed execution natively.
DUse Cloud Tasks because it only supports fire-and-forget messaging without retries.
Attempts:
2 left
💡 Hint

Consider which service supports task ordering and retries explicitly.

service_behavior
advanced
2:00remaining
Pub/Sub Subscription Acknowledgment Behavior

What happens if a Pub/Sub subscriber does not acknowledge a message within the ack deadline?

AThe message is deleted and never redelivered.
BThe message is redelivered to the same or another subscriber after the ack deadline expires.
CThe message is moved to a dead-letter queue immediately.
DThe subscriber is disconnected and must reconnect manually.
Attempts:
2 left
💡 Hint

Think about how Pub/Sub ensures message processing reliability.

security
advanced
2:00remaining
Securing Cloud Tasks Execution

Which method is recommended to securely authenticate HTTP targets when Cloud Tasks dispatches tasks?

AUse API keys embedded in the task payload.
BUse OAuth 2.0 tokens or OIDC tokens generated by Cloud Tasks for authentication.
CUse basic authentication with username and password in the URL.
DNo authentication is needed because Cloud Tasks runs inside Google Cloud.
Attempts:
2 left
💡 Hint

Consider secure token-based authentication methods supported by Cloud Tasks.

Best Practice
expert
3:00remaining
Handling High Throughput with Pub/Sub and Cloud Tasks

You have a system that must handle millions of user events per day with low latency and guaranteed processing. Which architecture best balances scalability and reliability?

AUse Pub/Sub to ingest events and Cloud Tasks to process critical tasks with retries and ordering.
BUse only Cloud Tasks for all events to ensure ordering and retries at scale.
CUse Pub/Sub with no retries and process events directly without task queues.
DUse Cloud Tasks to ingest events and Pub/Sub to process tasks asynchronously.
Attempts:
2 left
💡 Hint

Think about combining services to leverage their strengths for scale and reliability.