PDE Designing Data Processing Systems Practice Question
A logistics company uses Cloud Pub/Sub to ingest shipment tracking events. They want to archive all events to Cloud Storage for long-term retention and also process them in real time with Dataflow. The events are published to a single topic. Which design should the data engineer use to ensure both archiving and real-time processing without data loss?
⚠ Common exam trap
The trap here is assuming that a single subscription can be shared by multiple consumers to receive all messages, but Pub/Sub delivers each message to only one consumer per subscription.
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
✓
Create two subscriptions on the topic: one for the Dataflow pipeline and one for a Cloud Function that writes to Cloud Storage.
The correct design is to create two separate subscriptions on the Pub/Sub topic: one for Dataflow and one for a Cloud Function that archives to Cloud Storage. This fan-out pattern ensures that each event is delivered to both consumers independently, preventing data loss and allowing each to process at its own pace. It decouples archiving from real-time processing.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Create two subscriptions on the topic: one for the Dataflow pipeline and one for a Cloud Function that writes to Cloud Storage.
Why this is correct
Pub/Sub allows multiple subscriptions on a single topic, each receiving a copy of every message. By creating one subscription for Dataflow and another for a Cloud Function that archives to Cloud Storage, both consumers independently receive all events. This ensures no data loss and allows independent processing. This is the standard fan-out pattern.
- ✗
Configure the Pub/Sub topic to write to Cloud Storage directly using a Pub/Sub to Cloud Storage subscription.
Why it's wrong here
Pub/Sub does not have a built-in subscription type that writes directly to Cloud Storage. You would need a Dataflow template or a Cloud Function to do that. Therefore, this option is not a valid feature. It misrepresents Pub/Sub capabilities.
- ✗
Use a single subscription for both the Dataflow pipeline and a Cloud Function that writes to Cloud Storage.
Why it's wrong here
A single subscription delivers each message to only one consumer. If both the Dataflow pipeline and the Cloud Function pull from the same subscription, they will compete for messages, and each message will be processed by only one of them. This would result in data loss for one of the purposes. It does not provide fan-out.
- ✗
Use a single subscription for the Dataflow pipeline, and have the pipeline write to both Cloud Storage and its real-time processing output.
Why it's wrong here
While the Dataflow pipeline could write to both sinks, this couples the archiving logic with the real-time processing. If the pipeline fails or needs to be updated, archiving stops. Also, the pipeline would need to handle both tasks, complicating the code. It does not provide independent, reliable archiving as a separate subscription would.
Go deeper
Related to this question
About these practice questions
This PDE question is part of Courseiva's 747-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Google Cloud exam blueprint
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.