nerdexam
GoogleGoogle

PROFESSIONAL-CLOUD-DEVELOPER · Question #292

PROFESSIONAL-CLOUD-DEVELOPER Question #292: Real Exam Question with Answer & Explanation

The correct answer is B: Install the Pub/Sub emulator using gcloud, and start the emulator with a valid Google Project ID.. For local testing of Pub/Sub integration in a web application, installing and using the Pub/Sub emulator is the most efficient approach. The emulator can be installed via gcloud and started with a valid Google Project ID. Configuring your application to use the emulator locally i

Developing, deploying, and debugging applications

Question

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?

Options

  • AIn the Google Cloud console, navigate to the API Library, and enable the Pub/Sub API. When
  • BInstall the Pub/Sub emulator using gcloud, and start the emulator with a valid Google Project ID.
  • CRun the gcloud config set api_endpoint_overrides/pubsub
  • DInstall Cloud Code on the integrated development environment (IDE). Navigate to Cloud APIs,

Explanation

For local testing of Pub/Sub integration in a web application, installing and using the Pub/Sub emulator is the most efficient approach. The emulator can be installed via gcloud and started with a valid Google Project ID. Configuring your application to use the emulator locally is done by setting the PUBSUB_EMULATOR_HOST environment variable. https://cloud.google.com/pubsub/docs/emulator

Topics

#Pub/Sub#Local Development#Emulators#Testing

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER PracticeBrowse All PROFESSIONAL-CLOUD-DEVELOPER Questions