Question 181 · 357 in bank
You have a web application that publishes messages to Pub/Sub. You plan to build new versions of the application locally and want to quickly test Pub/Sub integration for each new build. How should you configure local testing?
Show answer
Answer: B
Explanation
https://cloud.google.com/pubsub/docs/emulator#automatically_setting_the_variables If your application and the emulator run on the same machine, you can set the environment variables automatically with: 1) $(gcloud beta emulators pubsub env-init) If your application and the emulator run on different machines, set the environment variables manually with: 1) Run the env-init command: gcloud beta emulators pubsub env-init 2) On the machine that runs your application, set the PUBSUB_EMULATOR_HOST
Source: Adapted from community discussion — [Removed]