Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
deps: update dependency com.google.cloud:google-cloud-pubsublite to v…
…0.18.0 (#221)
  • Loading branch information
jiangmichaellll committed Jul 29, 2021
1 parent 372589a commit 7d073cd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -43,7 +43,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsublite</artifactId>
<version>0.16.1</version>
<version>0.18.0</version>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
Expand Down
2 changes: 1 addition & 1 deletion samples/snapshot/pom.xml
Expand Up @@ -44,7 +44,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsublite</artifactId>
<version>0.16.1</version>
<version>0.18.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
2 changes: 1 addition & 1 deletion samples/snippets/pom.xml
Expand Up @@ -44,7 +44,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsublite</artifactId>
<version>0.16.1</version>
<version>0.18.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Expand Up @@ -23,8 +23,8 @@
import com.google.cloud.pubsub.v1.AckReplyConsumer;
import com.google.cloud.pubsub.v1.MessageReceiver;
import com.google.cloud.pubsublite.AdminClient;
import com.google.cloud.pubsublite.AdminClient.BacklogLocation;
import com.google.cloud.pubsublite.AdminClientSettings;
import com.google.cloud.pubsublite.BacklogLocation;
import com.google.cloud.pubsublite.CloudRegion;
import com.google.cloud.pubsublite.CloudZone;
import com.google.cloud.pubsublite.MessageMetadata;
Expand Down
Expand Up @@ -148,7 +148,8 @@ PartitionSubscriberFactory getSubscriberFactory() {
try {
SubscriberServiceClient serviceClient =
SubscriberServiceClient.create(
addDefaultSettings(this.subscriptionPath().location().region(), settingsBuilder));
addDefaultSettings(
this.subscriptionPath().location().extractRegion(), settingsBuilder));
return SubscriberBuilder.newBuilder()
.setSubscriptionPath(this.subscriptionPath())
.setPartition(partition)
Expand All @@ -170,7 +171,7 @@ private CursorServiceClient newCursorServiceClient() {
try {
return CursorServiceClient.create(
addDefaultSettings(
this.subscriptionPath().location().region(),
this.subscriptionPath().location().extractRegion(),
CursorServiceSettings.newBuilder()
.setCredentialsProvider(new PslCredentialsProvider(credentialsKey()))));
} catch (IOException e) {
Expand All @@ -181,7 +182,7 @@ private CursorServiceClient newCursorServiceClient() {
CursorClient newCursorClient() {
return CursorClient.create(
CursorClientSettings.newBuilder()
.setRegion(this.subscriptionPath().location().region())
.setRegion(this.subscriptionPath().location().extractRegion())
.setServiceClient(newCursorServiceClient())
.build());
}
Expand All @@ -190,7 +191,7 @@ private AdminServiceClient newAdminServiceClient() {
try {
return AdminServiceClient.create(
addDefaultSettings(
this.subscriptionPath().location().region(),
this.subscriptionPath().location().extractRegion(),
AdminServiceSettings.newBuilder()
.setCredentialsProvider(new PslCredentialsProvider(credentialsKey()))));
} catch (IOException e) {
Expand All @@ -201,7 +202,7 @@ private AdminServiceClient newAdminServiceClient() {
AdminClient newAdminClient() {
return AdminClient.create(
AdminClientSettings.newBuilder()
.setRegion(this.subscriptionPath().location().region())
.setRegion(this.subscriptionPath().location().extractRegion())
.setServiceClient(newAdminServiceClient())
.build());
}
Expand All @@ -210,7 +211,7 @@ private TopicStatsServiceClient newTopicStatsServiceClient() {
try {
return TopicStatsServiceClient.create(
addDefaultSettings(
this.subscriptionPath().location().region(),
this.subscriptionPath().location().extractRegion(),
TopicStatsServiceSettings.newBuilder()
.setCredentialsProvider(new PslCredentialsProvider(credentialsKey()))));
} catch (IOException e) {
Expand All @@ -221,7 +222,7 @@ private TopicStatsServiceClient newTopicStatsServiceClient() {
TopicStatsClient newTopicStatsClient() {
return TopicStatsClient.create(
TopicStatsClientSettings.newBuilder()
.setRegion(this.subscriptionPath().location().region())
.setRegion(this.subscriptionPath().location().extractRegion())
.setServiceClient(newTopicStatsServiceClient())
.build());
}
Expand Down
Expand Up @@ -110,7 +110,7 @@ private PublisherServiceClient newServiceClient(Partition partition) throws ApiE
settingsBuilder);
try {
return PublisherServiceClient.create(
addDefaultSettings(topicPath().location().region(), settingsBuilder));
addDefaultSettings(topicPath().location().extractRegion(), settingsBuilder));
} catch (Throwable t) {
throw toCanonical(t).underlying;
}
Expand All @@ -123,10 +123,10 @@ private AdminClient getAdminClient() throws ApiException {
.setServiceClient(
AdminServiceClient.create(
addDefaultSettings(
topicPath().location().region(),
topicPath().location().extractRegion(),
AdminServiceSettings.newBuilder()
.setCredentialsProvider(getCredentialProvider()))))
.setRegion(topicPath().location().region())
.setRegion(topicPath().location().extractRegion())
.build());
} catch (Throwable t) {
throw toCanonical(t).underlying;
Expand Down

0 comments on commit 7d073cd

Please sign in to comment.