gogol icon indicating copy to clipboard operation
gogol copied to clipboard

Using gogol-pubsub with the official PubSub emulator

Open mrkkrp opened this issue 3 years ago • 1 comments

I'm trying to use the library with the PubSub emulator. According to the docs setting the following environment variables

export PUBSUB_EMULATOR_HOST=localhost:<port>
export PUBSUB_PROJECT_ID=<project-id>

Should inform the applications built with "Google Cloud Client Libraries" (do these libraries use that?) that the emulator is being used. In my case setting the env variables has no effect and I get 404 error messages:

Requested project not found or user does not have access to it (project=<project-id>). Make sure to specify the unique project identifier and not the Google Cloud Console display name.

This happens even when the emulator is not running, so the library doesn't seem to even attempt to interact with the emulator.

Is it possible to talk to the emulator using the gogol-pubsub library?

mrkkrp avatar Aug 21 '20 11:08 mrkkrp

gogol predates the "Google Cloud Client Libraries" specification and emulator and also offers no specific environment variable support outside of the compute authentication related variables.

I have an update (2.0, if you will) in the works which will incorporate many (most?) of these changes but unfortunately due to covid is still far away from being useful.

brendanhay avatar Aug 21 '20 12:08 brendanhay