Skip to content

Commit 4af327a

Browse files
authored
Merge pull request #3296 from alixhami/pubsub-region-tags
Pubsub: adds missing region tags
2 parents 58f0c89 + fd28af4 commit 4af327a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/PublisherSnippets.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,13 @@ public Publisher getPublisherWithCustomRetrySettings(ProjectTopicName topicName)
122122
}
123123

124124
public Publisher getSingleThreadedPublisher(ProjectTopicName topicName) throws Exception {
125-
// [START pubsub_publisher_single_threaded]
125+
// [START pubsub_publisher_concurrency_control]
126126
// create a publisher with a single threaded executor
127127
ExecutorProvider executorProvider = InstantiatingExecutorProvider.newBuilder()
128128
.setExecutorThreadCount(1).build();
129129
Publisher publisher = Publisher.newBuilder(topicName)
130130
.setExecutorProvider(executorProvider).build();
131-
// [END pubsub_publisher_single_threaded]
131+
// [END pubsub_publisher_concurrency_control]
132132
return publisher;
133133
}
134134

google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/SubscriberSnippets.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public void failed(Subscriber.State from, Throwable failure) {
146146
}
147147

148148
private Subscriber createSingleThreadedSubscriber() throws Exception {
149-
// [START pubsub_subscriber_single_threaded]
149+
// [START pubsub_subscriber_concurrency_control]
150150
// provide a separate executor service for polling
151151
ExecutorProvider executorProvider =
152152
InstantiatingExecutorProvider.newBuilder().setExecutorThreadCount(1).build();
@@ -155,7 +155,7 @@ private Subscriber createSingleThreadedSubscriber() throws Exception {
155155
Subscriber.newBuilder(subscriptionName, receiver)
156156
.setExecutorProvider(executorProvider)
157157
.build();
158-
// [END pubsub_subscriber_single_threaded]
158+
// [END pubsub_subscriber_concurrency_control]
159159
return subscriber;
160160
}
161161

0 commit comments

Comments
 (0)