Open saturnism opened 3 years ago
Additional question regarding this. Pub/Sub Subscriber and Publisher both have a setEndpoint
method now. But both are not really useful, since the emulator needs plaintext. Is there any chance to set this NegotiationType on the Builders too? Configuring a channelProvider is not really great. The prod code will not set the channelProvider, so I need to introduce such a bean injection just for the test case, and null for the prod case.
Is your feature request related to a problem? Please describe. Client libraries currently can use emulators by configuring respective environmental variables. However, in the case of dynamically launching emulators during unit/integration tests using JUnit and Testcontainers, each client library needs to be configured programatically. For all of the supported emulators, client library configurations are very different from each other, and mostly not well documented.
See examples:
Describe the solution you'd like A consistent way of setting emulator host and auto configures the emulator credentials. Spanner is the cleanest/best example of this, which is simply
setEmulatorHost(hostport)
.Describe alternatives you've considered
Additional context https://github.com/spring-cloud/spring-cloud-gcp/issues/2589