From 9b37268f58cbc17763b1d4815aac3241ad0fb5a0 Mon Sep 17 00:00:00 2001 From: Mike Prieto Date: Mon, 12 Feb 2024 19:20:11 +0000 Subject: [PATCH] feat: Set default endpoint as null for Subscribers and Publishers --- .../src/main/java/com/google/cloud/pubsub/v1/Publisher.java | 2 +- .../src/main/java/com/google/cloud/pubsub/v1/Subscriber.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java index c7d252c85..efaba6cf1 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java @@ -718,7 +718,7 @@ public static final class Builder { static final long DEFAULT_COMPRESSION_BYTES_THRESHOLD = 240L; String topicName; - private String endpoint = PublisherStubSettings.getDefaultEndpoint(); + private String endpoint = null; private String universeDomain = null; // Batching options diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java index f5eddd2e1..1723c72b1 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java @@ -492,7 +492,7 @@ public static final class Builder { SubscriptionAdminSettings.defaultCredentialsProviderBuilder().build(); private Optional clock = Optional.absent(); private int parallelPullCount = 1; - private String endpoint = SubscriberStubSettings.getDefaultEndpoint(); + private String endpoint = null; private String universeDomain = null; Builder(String subscription, MessageReceiver receiver) {