Design a scalable, decoupled pipeline to deliver jobs from producers (job generators) to consumers (job runners) that allows adding new applications without degrading existing performance. Which approach should you use?
Choose an answer
Tap an option to check your answer.
Correct answer: Use a Cloud Pub/Sub topic to publish jobs, and use subscriptions to execute them.
Why this is the answer
Cloud Pub/Sub is ideal for this scenario because it provides a scalable, asynchronous messaging service that naturally decouples producers from consumers. Producers publish messages (jobs) to a topic, and consumers subscribe to that topic to receive and process jobs. This design allows new applications (consumers) to be added easily via new subscriptions without impacting existing performance or requiring changes to the producers. Cloud Pub/Sub handles message delivery, retries, and scaling automatically. Creating an API on App Engine would require consumers to actively poll or be notified, adding complexity and latency. Cloud SQL and Cloud Spanner are relational databases designed for structured data storage and transactional workloads, not asynchronous message queuing. While they could store job information, using them for message passing would be inefficient, less scalable, and would require custom polling mechanisms, leading to higher operational overhead and potential performance bottlenecks compared to a dedicated messaging service.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed