Question 613 of 1,000
hardMultiple SelectObjective-mapped

Guarantee Exactly-Once Processing and Ordering per Customer Key

This PDE practice question tests your understanding of ordering keys. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. A key principle to apply: ordering keys. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A streaming pipeline uses Cloud Pub/Sub and Dataflow to process financial transactions. The pipeline must guarantee that each transaction is processed exactly once and in order per customer key. Which two configurations are necessary? (Choose two.)

Quick Answer

The answer is to use a Pub/Sub topic with ordering keys and Dataflow stateful processing with event time ordering. Pub/Sub ordering keys guarantee that messages sharing the same customer key are delivered to the subscriber in the exact order they were published, which is essential for financial transactions where sequence matters. Dataflow’s stateful processing then maintains per-key state and processes events based on their event time, ensuring exactly-once semantics even during failures or retries. On the Google Professional Data Engineer exam, this pairing tests your understanding of how to combine Pub/Sub’s ordered delivery with Dataflow’s robust processing model to achieve both ordering and exactly-once guarantees in a streaming pipeline. A common trap is thinking a global window or session window can enforce order, but these only group events without preserving sequence. Memory tip: “Ordered keys in, stateful processing out” — the ordering key locks the sequence, and stateful Dataflow locks the processing.

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

Use Dataflow stateful processing with event time ordering

Option C is correct because Dataflow's stateful processing with event time ordering allows you to maintain per-key state and process elements in the order of their event timestamps, which is essential for guaranteeing exactly-once processing and in-order handling per customer key. This ensures that each transaction is processed once and in the correct sequence, even in the presence of out-of-order data arrival. Option D is also correct because Pub/Sub ordering keys enable messages with the same ordering key to be delivered to the subscriber in the order they were published. By using ordering keys corresponding to customer keys, the pipeline can receive transactions for each customer in order, which is a prerequisite for in-order processing. Together, these two configurations provide end-to-end exactly-once and in-order guarantees.

Key principle: Ordering keys

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use a session window with max gap duration

    Why it's wrong here

    Session windows group events by activity gaps, not for in-order processing.

  • Use a keyed state with a value state per customer

    Why it's wrong here

    Keyed state is a technique, but stateful processing with event time ordering is the specific configuration needed.

  • Use Dataflow stateful processing with event time ordering

    Why this is correct

    Dataflow stateful processing with event time ordering allows processing events per key in the order they were generated, with exactly-once guarantees.

    Related concept

    Ordering keys

  • Use a Pub/Sub topic with ordering keys

    Why this is correct

    Ordering keys in Pub/Sub guarantee that messages with the same key are delivered to subscribers in order.

    Related concept

    Ordering keys

  • Use a global window with a trigger

    Why it's wrong here

    Global windows with triggers produce panes but do not preserve order within a key.

Common exam traps

Common exam trap: answer the scenario, not the keyword

A common misconception is that session windows or global windows can provide per-key ordering, but these windowing strategies are designed for different use cases and do not enforce event time ordering or exactly-once processing per key. In Google Cloud, the correct approach combines Dataflow's stateful processing with Pub/Sub ordering keys.

Detailed technical explanation

How to think about this question

Under the hood, Dataflow's stateful processing leverages the Apache Beam model, which uses event time timestamps and watermarks to manage out-of-order data. The exactly-once guarantee is achieved through a combination of idempotent writes and checkpointing of state, ensuring that even if a worker fails, the state is restored and processing resumes without duplication. In real-world scenarios, this is critical for financial systems where duplicate or out-of-order transactions could lead to incorrect balances or audit failures.

KKey Concepts to Remember

  • Ordering keys
  • Stateful processing
  • Event time ordering

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Ordering keys

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Ordering keys Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

Related practice questions

Related PDE practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PDE practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PDE question test?

Ordering keys

What is the correct answer to this question?

The correct answer is: Use Dataflow stateful processing with event time ordering — Option C is correct because Dataflow's stateful processing with event time ordering allows you to maintain per-key state and process elements in the order of their event timestamps, which is essential for guaranteeing exactly-once processing and in-order handling per customer key. This ensures that each transaction is processed once and in the correct sequence, even in the presence of out-of-order data arrival. Option D is also correct because Pub/Sub ordering keys enable messages with the same ordering key to be delivered to the subscriber in the order they were published. By using ordering keys corresponding to customer keys, the pipeline can receive transactions for each customer in order, which is a prerequisite for in-order processing. Together, these two configurations provide end-to-end exactly-once and in-order guarantees.

What should I do if I get this PDE question wrong?

Review ordering keys, then practise related PDE questions on the same topic to reinforce the concept.

What is the key concept behind this question?

Ordering keys

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More PDE practice questions

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.