Google Cloud Professional Cloud Developer — Question 271

You have a web application that publishes messages to Pub/Sub. You plan to build new versions of the application locally and need to quickly test Pub/Sub integration for each new build. How should you configure local testing?

Answer options

Correct answer: B

Explanation

The correct answer is B because using the Pub/Sub emulator allows for efficient local testing without needing to interact with the actual Pub/Sub service. Option A doesn't provide a local testing solution, while C incorrectly suggests changing the endpoint and D involves unnecessary steps for local development.