Before deploying an app that reads credit card data from a Pub/Sub subscription, you need to test Pub/Sub integration locally. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a service to publish messages, and deploy the Pub/Sub emulator. Publish a standard set of testing messages from the publishing service to the emulator..
Why this is the answer
The correct approach is to use the Pub/Sub emulator with a standard set of testing messages. The Pub/Sub emulator provides a local environment that mimics the production Pub/Sub service, allowing you to test your application's integration without incurring costs or affecting live data. Publishing a standard set of testing messages ensures consistent and repeatable tests, which is crucial for verifying your application's behavior, especially when handling sensitive data like credit card information. The other options are less suitable: Generating random content is not ideal for testing sensitive data processing, as it doesn't allow for predictable validation of your application's logic. Collecting messages from production and replaying them through a publishing service or to the emulator is risky, as it involves handling actual credit card data outside of a secure production environment, which is a significant security and compliance concern.
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