easyMultiple SelectObjective-mapped
PDE A company uses Pub/Sub to decouple services Practice Question
A company uses Pub/Sub to decouple services. They have a topic with two subscriptions: Subscription A is a push subscription that sends messages to a Cloud Function; Subscription B is a pull subscription used by a Dataflow job. They need to ensure that messages are processed in order for a specific device_id. Which TWO configurations should they apply?
⚠ Common exam trap
Google Cloud often tests the misconception that multiple subscriptions or multiple consumers can maintain ordering independently, but in Pub/Sub, ordering is per subscription and per ordering key, and only a single subscriber per subscription can guarantee FIFO delivery.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Enable message ordering on the topic and set an ordering key for each message.
Enabling message ordering on the topic and setting an ordering key (e.g., device_id) ensures that messages with the same key are delivered to subscribers in the order they were published. This is a fundamental Pub/Sub feature that guarantees FIFO (first-in, first-out) delivery per ordering key, which directly addresses the requirement for processing messages in order for a specific device_id.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Enable message ordering on the topic and set an ordering key for each message.
Why this is correct
Ordering key is required for ordered delivery.
- ✗
Disable duplicate filtering on the topic.
Why it's wrong here
Duplicate filtering doesn't relate to ordering.
- ✗
Configure the Cloud Function to retry on failure with exponential backoff.
Why it's wrong here
Retries don't preserve order.
- ✓
Use exactly one subscription for both the Cloud Function and Dataflow job.
Why this is correct
Ordering is guaranteed per subscription; having two subscriptions can lead to out-of-order processing across consumers of the same ordering key.
- ✗
Use a single subscription with multiple concurrent consumers.
Why it's wrong here
Multiple consumers break ordering.
Go deeper
Related to this question
About these practice questions
One of 890 original PDE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PDE exam.