Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
How should you design an event-driven architecture using Pub/Sub where messages are processed in real time, with the application being self-contained and cost-effective (only incurring charges when new messages arrive)?
A
Deploy the application on Compute Engine. Use a Pub/Sub push subscription to process new messages in the topic.
B
Deploy your code on Cloud Functions. Use a Pub/Sub trigger to invoke the Cloud Function. Use the Pub/Sub API to create a pull subscription to the Pub/Sub topic and read messages from it.
C
Deploy the application on Google Kubernetes Engine. Use the Pub/Sub API to create a pull subscription to the Pub/Sub topic and read messages from it.
D
Deploy your code on Cloud Functions. Use a Pub/Sub trigger to handle new messages in the topic.