Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your team is building an order-processing microservice on GKE that consumes customer order events from a Pub/Sub topic using a client library. Because downstream updates are not idempotent, the system has the following requirements:
Which configuration should you implement?
In this setup, a Pull subscriber receives ordered messages for a customer ordering_key but dispatches them asynchronously to parallel worker threads that acknowledge messages independently as each finishes, while relying on immediate redelivery and omitting a dead-letter topic.
ordering_key are acknowledged. Processing and acknowledging out of order means an earlier failure causes Pub/Sub to redeliver all subsequent messages for that key—even ones the worker already processed—violating data integrity.ordering_key, blocking delivery of all later events for that customer until retention expires and potentially delaying other keys during restarts.ordering_key, but offloading work to asynchronous thread pools breaks ordering unless a per-key local work queue is used.ordering_key.Events had no ordering requirements (no ordering_key), downstream operations were completely idempotent, and malformed messages could simply be discarded after message retention expired.
This configuration combines Pub/Sub Pull (or StreamingPull via high-level client libraries) with message ordering, exactly-once delivery, a subscription retry policy, and a dead-letter topic to provide strict sequencing, deduplication, and resilient error handling.
ordering_key and publishing to a regional or locational endpoint ensures Pub/Sub maintains order within that region for each customer while scaling delivery across different keys in parallel. Enabling message ordering on the subscription and acknowledging messages in order per key preserves strict execution sequence.minimumBackoff and maximumBackoff) on the subscription progressively increases delays after negative acknowledgments (nack) or expired deadlines, protecting recovering downstream systems.ordering_key values while serializing delivery within each key.Unlike Push subscriptions, Pull supports exactly-once delivery and avoids single-outstanding-message bottlenecks per key. Unlike Dataflow pipelines, native Pub/Sub subscribers directly support Pub/Sub retry policies, message ordering, and dead-letter topics without architectural conflicts.
A Push subscription delivers messages as outbound HTTP POST requests from Pub/Sub to a configured webhook endpoint. The global endpoint (pubsub.googleapis.com) routes publish calls to whichever Google Cloud region is network-nearest to each publisher client.
ordering_key, Push delivery suffers severe latency and throughput constraints.ordering_key are published in the same region. Using the global endpoint allows distributed publishers to write to different regions, breaking ordering guarantees.The subscriber application could not make outbound requests or use a client library, could safely tolerate at-least-once duplicate deliveries via idempotent handlers, and received ordered messages infrequently per key from single-region publishers.
Dataflow executes Apache Beam streaming pipelines using a custom Pub/Sub I/O connector that manages acknowledgment deadline extensions, checkpointing, and deduplication internally across distributed workers.
nack) when user pipeline code throws an exception; instead, it retries work items indefinitely while extending acknowledgment deadlines. Because of this, Pub/Sub exponential backoff retry policies do not function with Dataflow and must be left at Retry immediately.nack signals during events like worker shutdowns, which can falsely route healthy messages to the dead-letter topic, and it acknowledges bundles immediately after the first fused stage—meaning later-stage failures never reach the Pub/Sub dead-letter topic.ErrorHandler in Java or with_exception_handling in Python).You needed large-scale Apache Beam stream processing, disabled Pub/Sub message ordering, exactly-once delivery, exponential backoff, and dead-letter topics, and implemented deduplication (withIdAttribute) and dead-letter routing inside the Dataflow pipeline itself.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated