diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml
index 5a97a4380..9cdd9a056 100644
--- a/.github/workflows/hermetic_library_generation.yaml
+++ b/.github/workflows/hermetic_library_generation.yaml
@@ -32,12 +32,12 @@ jobs:
else
echo "SHOULD_RUN=true" >> $GITHUB_ENV
fi
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
if: env.SHOULD_RUN == 'true'
with:
fetch-depth: 0
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
- - uses: googleapis/sdk-platform-java/.github/scripts@v2.61.0
+ - uses: googleapis/sdk-platform-java/.github/scripts@v2.62.0
if: env.SHOULD_RUN == 'true'
with:
base_ref: ${{ github.base_ref }}
diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml
index 518bef3c0..a22902fda 100644
--- a/.github/workflows/unmanaged_dependency_check.yaml
+++ b/.github/workflows/unmanaged_dependency_check.yaml
@@ -5,7 +5,7 @@ jobs:
unmanaged_dependency_check:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
- uses: actions/setup-java@v4
with:
distribution: temurin
@@ -17,6 +17,6 @@ jobs:
# repository
.kokoro/build.sh
- name: Unmanaged dependency check
- uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.51.0
+ uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.52.0
with:
bom-path: google-cloud-pubsub-bom/pom.xml
diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg
index 783727ef0..5816d6107 100644
--- a/.kokoro/presubmit/graalvm-native-a.cfg
+++ b/.kokoro/presubmit/graalvm-native-a.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.51.0" # {x-version-update:google-cloud-shared-dependencies:current}
+ value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.52.0" # {x-version-update:google-cloud-shared-dependencies:current}
}
env_vars: {
diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg
index 83c7afee0..7986fd673 100644
--- a/.kokoro/presubmit/graalvm-native-b.cfg
+++ b/.kokoro/presubmit/graalvm-native-b.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.51.0" # {x-version-update:google-cloud-shared-dependencies:current}
+ value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.52.0" # {x-version-update:google-cloud-shared-dependencies:current}
}
env_vars: {
diff --git a/.kokoro/presubmit/graalvm-native-c.cfg b/.kokoro/presubmit/graalvm-native-c.cfg
index 3a9bbf8c3..acecfce1b 100644
--- a/.kokoro/presubmit/graalvm-native-c.cfg
+++ b/.kokoro/presubmit/graalvm-native-c.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.51.0" # {x-version-update:google-cloud-shared-dependencies:current}
+ value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.52.0" # {x-version-update:google-cloud-shared-dependencies:current}
}
env_vars: {
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 58b8e5f1a..819992899 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,23 @@
# Changelog
+## [1.141.3](https://github.com/googleapis/java-pubsub/compare/v1.141.2...v1.141.3) (2025-08-19)
+
+
+### Bug Fixes
+
+* Use the system executor instead of a separate thread pool for EOD ack/modack callbacks ([#2526](https://github.com/googleapis/java-pubsub/issues/2526)) ([ffeb017](https://github.com/googleapis/java-pubsub/commit/ffeb017a58ca486688105738f180d70df33a74de))
+
+
+### Dependencies
+
+* Update actions/checkout action to v5 ([#2520](https://github.com/googleapis/java-pubsub/issues/2520)) ([409398a](https://github.com/googleapis/java-pubsub/commit/409398a40f71866d5a84b4542d582777ee240a08))
+* Update dependency com.google.cloud:google-cloud-bigquery to v2.54.1 ([#2523](https://github.com/googleapis/java-pubsub/issues/2523)) ([0678a74](https://github.com/googleapis/java-pubsub/commit/0678a74dc22f73cd8ec8c4893c1a8dd60449b128))
+* Update dependency com.google.cloud:google-cloud-core to v2.60.0 ([#2527](https://github.com/googleapis/java-pubsub/issues/2527)) ([0166e21](https://github.com/googleapis/java-pubsub/commit/0166e21012f0bc2ccb2e832d6f27e60ad3382456))
+* Update dependency com.google.cloud:google-cloud-storage to v2.55.0 ([#2517](https://github.com/googleapis/java-pubsub/issues/2517)) ([b67acf1](https://github.com/googleapis/java-pubsub/commit/b67acf1294249be308568f49f287897ae55ced08))
+* Update dependency com.google.cloud:sdk-platform-java-config to v3.52.0 ([#2528](https://github.com/googleapis/java-pubsub/issues/2528)) ([e424d11](https://github.com/googleapis/java-pubsub/commit/e424d11ffe0fbe242c59dec44ac1af2f9bd80173))
+* Update dependency com.google.protobuf:protobuf-java-util to v4.32.0 ([#2524](https://github.com/googleapis/java-pubsub/issues/2524)) ([44ff087](https://github.com/googleapis/java-pubsub/commit/44ff0873171f8fe2e7cd79b4550f8ec94ea2c99a))
+* Update dependency org.assertj:assertj-core to v3.27.4 ([#2518](https://github.com/googleapis/java-pubsub/issues/2518)) ([67695bc](https://github.com/googleapis/java-pubsub/commit/67695bc50eafc475866eb6c300b3359083ecfe00))
+
## [1.141.2](https://github.com/googleapis/java-pubsub/compare/v1.141.1...v1.141.2) (2025-08-05)
diff --git a/README.md b/README.md
index 079fa2627..6eb40a178 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
com.google.cloud
libraries-bom
- 26.65.0
+ 26.66.0
pom
import
@@ -43,7 +43,7 @@ If you are using Maven without the BOM, add this to your dependencies:
com.google.cloud
google-cloud-pubsub
- 1.141.0
+ 1.141.2
```
@@ -51,20 +51,20 @@ If you are using Maven without the BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:
```Groovy
-implementation platform('com.google.cloud:libraries-bom:26.65.0')
+implementation platform('com.google.cloud:libraries-bom:26.66.0')
implementation 'com.google.cloud:google-cloud-pubsub'
```
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-pubsub:1.141.2'
+implementation 'com.google.cloud:google-cloud-pubsub:1.141.3'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.141.2"
+libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.141.3"
```
## Authentication
@@ -420,7 +420,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-pubsub.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.141.2
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.141.3
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
diff --git a/generation_config.yaml b/generation_config.yaml
index dd5aa2fb7..afd0df121 100644
--- a/generation_config.yaml
+++ b/generation_config.yaml
@@ -1,6 +1,6 @@
-gapic_generator_version: 2.61.0
-googleapis_commitish: 8c74a4f9ad52cfd7a7d1f6427fa0a0511377a395
-libraries_bom_version: 26.65.0
+gapic_generator_version: 2.62.0
+googleapis_commitish: 3b2a2ae91db23a9c879b2b725d6a5de6bd64a800
+libraries_bom_version: 26.66.0
libraries:
- api_shortname: pubsub
name_pretty: Cloud Pub/Sub
diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml
index d0d84a48c..e4ee94db3 100644
--- a/google-cloud-pubsub-bom/pom.xml
+++ b/google-cloud-pubsub-bom/pom.xml
@@ -3,12 +3,12 @@
4.0.0
com.google.cloud
google-cloud-pubsub-bom
- 1.141.2
+ 1.141.3
pom
com.google.cloud
sdk-platform-java-config
- 3.51.0
+ 3.52.0
Google Cloud pubsub BOM
@@ -52,17 +52,17 @@
com.google.cloud
google-cloud-pubsub
- 1.141.2
+ 1.141.3
com.google.api.grpc
grpc-google-cloud-pubsub-v1
- 1.123.2
+ 1.123.3
com.google.api.grpc
proto-google-cloud-pubsub-v1
- 1.123.2
+ 1.123.3
diff --git a/google-cloud-pubsub/clirr-ignored-differences.xml b/google-cloud-pubsub/clirr-ignored-differences.xml
index 866962660..e4629e32e 100644
--- a/google-cloud-pubsub/clirr-ignored-differences.xml
+++ b/google-cloud-pubsub/clirr-ignored-differences.xml
@@ -15,4 +15,10 @@
*(org.threeten.bp.Duration)
*(java.time.Duration)
+
+ 7002
+
+ com/google/cloud/pubsub/v1/StreamingSubscriberConnection$Builder
+ * setEodAckCallbackExecutor(*)
+
diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml
index 1b8eb53ba..c66d62599 100644
--- a/google-cloud-pubsub/pom.xml
+++ b/google-cloud-pubsub/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-pubsub
- 1.141.2
+ 1.141.3
jar
Google Cloud Pub/Sub
https://github.com/googleapis/java-pubsub
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-pubsub-parent
- 1.141.2
+ 1.141.3
google-cloud-pubsub
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java
index 6a53b0206..baf96f385 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java
@@ -62,7 +62,6 @@
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
-import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -99,7 +98,6 @@ final class StreamingSubscriberConnection extends AbstractApiService implements
private final String subscription;
private final SubscriptionName subscriptionNameObject;
private final ScheduledExecutorService systemExecutor;
- private final ExecutorService eodAckCallbackExecutor;
private final MessageDispatcher messageDispatcher;
private final FlowControlSettings flowControlSettings;
@@ -131,7 +129,6 @@ private StreamingSubscriberConnection(Builder builder) {
subscription = builder.subscription;
subscriptionNameObject = SubscriptionName.parse(builder.subscription);
systemExecutor = builder.systemExecutor;
- eodAckCallbackExecutor = builder.eodAckCallbackExecutor;
// We need to set the default stream ack deadline on the initial request, this will be
// updated by modack requests in the message dispatcher
@@ -720,11 +717,14 @@ public void run() {
};
}
+ // If exactly-once is enabled, we hold a lock for the ack/modack response callback, so we want to
+ // avoid using the directExecutor() which runs the callback on the invoking thread. Instead, we
+ // want to schedule the callback to be run on a different thread.
private Executor getCallbackExecutor() {
if (!getExactlyOnceDeliveryEnabled()) {
return directExecutor();
}
- return eodAckCallbackExecutor;
+ return systemExecutor;
}
/** Builder of {@link StreamingSubscriberConnection StreamingSubscriberConnections}. */
@@ -747,7 +747,6 @@ public static final class Builder {
private boolean useLegacyFlowControl;
private ScheduledExecutorService executor;
private ScheduledExecutorService systemExecutor;
- private ExecutorService eodAckCallbackExecutor;
private ApiClock clock;
private boolean enableOpenTelemetryTracing;
@@ -838,11 +837,6 @@ public Builder setSystemExecutor(ScheduledExecutorService systemExecutor) {
return this;
}
- public Builder setEodAckCallbackExecutor(ExecutorService eodAckCallbackExecutor) {
- this.eodAckCallbackExecutor = eodAckCallbackExecutor;
- return this;
- }
-
public Builder setClock(ApiClock clock) {
this.clock = clock;
return this;
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 49f809855..b149bed37 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
@@ -51,7 +51,6 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;
@@ -151,8 +150,6 @@ public class Subscriber extends AbstractApiService implements SubscriberInterfac
// An instantiation of the SystemExecutorProvider used for processing acks
// and other system actions.
@Nullable private final ScheduledExecutorService alarmsExecutor;
- // An executor used for handling ack and modack callbacks when exactly-once delivery is enabled.
- private final ExecutorService eodAckCallbackExecutor;
private final Distribution ackLatencyDistribution =
new Distribution(Math.toIntExact(MAX_STREAM_ACK_DEADLINE.getSeconds()) + 1);
@@ -204,15 +201,6 @@ private Subscriber(Builder builder) {
backgroundResources.add(new ExecutorAsBackgroundResource((alarmsExecutor)));
}
- // A cached thread pool will create new threads as needed but can reuse previously constructed
- // threads when available, which helps to improve performance.
- ThreadFactory eodAckCallbackThreadFactory =
- new ThreadFactoryBuilder()
- .setDaemon(true)
- .setNameFormat("Subscriber-EOD-CallbackExecutor-%d")
- .build();
- eodAckCallbackExecutor = Executors.newCachedThreadPool(eodAckCallbackThreadFactory);
-
TransportChannelProvider channelProvider = builder.channelProvider;
if (channelProvider.acceptsPoolSize()) {
channelProvider = channelProvider.withPoolSize(numPullers);
@@ -429,7 +417,6 @@ private void startStreamingConnections() {
.setUseLegacyFlowControl(useLegacyFlowControl)
.setExecutor(executor)
.setSystemExecutor(alarmsExecutor)
- .setEodAckCallbackExecutor(eodAckCallbackExecutor)
.setClock(clock)
.setEnableOpenTelemetryTracing(enableOpenTelemetryTracing)
.setTracer(tracer)
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java
index 7d44f29bf..df360653c 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java
@@ -68,6 +68,7 @@ public class GrpcPublisherStub extends PublisherStub {
.setFullMethodName("google.pubsub.v1.Publisher/CreateTopic")
.setRequestMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor updateTopicMethodDescriptor =
@@ -76,6 +77,7 @@ public class GrpcPublisherStub extends PublisherStub {
.setFullMethodName("google.pubsub.v1.Publisher/UpdateTopic")
.setRequestMarshaller(ProtoUtils.marshaller(UpdateTopicRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor publishMethodDescriptor =
@@ -84,6 +86,7 @@ public class GrpcPublisherStub extends PublisherStub {
.setFullMethodName("google.pubsub.v1.Publisher/Publish")
.setRequestMarshaller(ProtoUtils.marshaller(PublishRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(PublishResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor getTopicMethodDescriptor =
@@ -92,6 +95,7 @@ public class GrpcPublisherStub extends PublisherStub {
.setFullMethodName("google.pubsub.v1.Publisher/GetTopic")
.setRequestMarshaller(ProtoUtils.marshaller(GetTopicRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -101,6 +105,7 @@ public class GrpcPublisherStub extends PublisherStub {
.setFullMethodName("google.pubsub.v1.Publisher/ListTopics")
.setRequestMarshaller(ProtoUtils.marshaller(ListTopicsRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(ListTopicsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor<
@@ -114,6 +119,7 @@ public class GrpcPublisherStub extends PublisherStub {
ProtoUtils.marshaller(ListTopicSubscriptionsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListTopicSubscriptionsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -125,6 +131,7 @@ public class GrpcPublisherStub extends PublisherStub {
ProtoUtils.marshaller(ListTopicSnapshotsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListTopicSnapshotsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor deleteTopicMethodDescriptor =
@@ -133,6 +140,7 @@ public class GrpcPublisherStub extends PublisherStub {
.setFullMethodName("google.pubsub.v1.Publisher/DeleteTopic")
.setRequestMarshaller(ProtoUtils.marshaller(DeleteTopicRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -144,6 +152,7 @@ public class GrpcPublisherStub extends PublisherStub {
ProtoUtils.marshaller(DetachSubscriptionRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(DetachSubscriptionResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor setIamPolicyMethodDescriptor =
@@ -152,6 +161,7 @@ public class GrpcPublisherStub extends PublisherStub {
.setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy")
.setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor getIamPolicyMethodDescriptor =
@@ -160,6 +170,7 @@ public class GrpcPublisherStub extends PublisherStub {
.setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy")
.setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -171,6 +182,7 @@ public class GrpcPublisherStub extends PublisherStub {
ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private final UnaryCallable createTopicCallable;
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java
index 655027011..592a17bf5 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java
@@ -68,6 +68,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
.setFullMethodName("google.pubsub.v1.SchemaService/CreateSchema")
.setRequestMarshaller(ProtoUtils.marshaller(CreateSchemaRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor getSchemaMethodDescriptor =
@@ -76,6 +77,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
.setFullMethodName("google.pubsub.v1.SchemaService/GetSchema")
.setRequestMarshaller(ProtoUtils.marshaller(GetSchemaRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -86,6 +88,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
.setRequestMarshaller(ProtoUtils.marshaller(ListSchemasRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListSchemasResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -97,6 +100,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
ProtoUtils.marshaller(ListSchemaRevisionsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListSchemaRevisionsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor commitSchemaMethodDescriptor =
@@ -105,6 +109,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
.setFullMethodName("google.pubsub.v1.SchemaService/CommitSchema")
.setRequestMarshaller(ProtoUtils.marshaller(CommitSchemaRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -115,6 +120,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
.setRequestMarshaller(
ProtoUtils.marshaller(RollbackSchemaRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -125,6 +131,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
.setRequestMarshaller(
ProtoUtils.marshaller(DeleteSchemaRevisionRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor deleteSchemaMethodDescriptor =
@@ -133,6 +140,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
.setFullMethodName("google.pubsub.v1.SchemaService/DeleteSchema")
.setRequestMarshaller(ProtoUtils.marshaller(DeleteSchemaRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -144,6 +152,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
ProtoUtils.marshaller(ValidateSchemaRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ValidateSchemaResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -155,6 +164,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
ProtoUtils.marshaller(ValidateMessageRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ValidateMessageResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor setIamPolicyMethodDescriptor =
@@ -163,6 +173,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
.setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy")
.setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor getIamPolicyMethodDescriptor =
@@ -171,6 +182,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
.setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy")
.setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -182,6 +194,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private final UnaryCallable createSchemaCallable;
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java
index 740dec357..8c08d2ad3 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java
@@ -77,6 +77,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setFullMethodName("google.pubsub.v1.Subscriber/CreateSubscription")
.setRequestMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -87,6 +88,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setRequestMarshaller(
ProtoUtils.marshaller(GetSubscriptionRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -97,6 +99,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setRequestMarshaller(
ProtoUtils.marshaller(UpdateSubscriptionRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -108,6 +111,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
ProtoUtils.marshaller(ListSubscriptionsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListSubscriptionsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -118,6 +122,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setRequestMarshaller(
ProtoUtils.marshaller(DeleteSubscriptionRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -128,6 +133,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setRequestMarshaller(
ProtoUtils.marshaller(ModifyAckDeadlineRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor acknowledgeMethodDescriptor =
@@ -136,6 +142,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setFullMethodName("google.pubsub.v1.Subscriber/Acknowledge")
.setRequestMarshaller(ProtoUtils.marshaller(AcknowledgeRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor pullMethodDescriptor =
@@ -144,6 +151,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setFullMethodName("google.pubsub.v1.Subscriber/Pull")
.setRequestMarshaller(ProtoUtils.marshaller(PullRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(PullResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -155,6 +163,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
ProtoUtils.marshaller(StreamingPullRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(StreamingPullResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -165,6 +174,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setRequestMarshaller(
ProtoUtils.marshaller(ModifyPushConfigRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor getSnapshotMethodDescriptor =
@@ -173,6 +183,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setFullMethodName("google.pubsub.v1.Subscriber/GetSnapshot")
.setRequestMarshaller(ProtoUtils.marshaller(GetSnapshotRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Snapshot.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -184,6 +195,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
ProtoUtils.marshaller(ListSnapshotsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListSnapshotsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -194,6 +206,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setRequestMarshaller(
ProtoUtils.marshaller(CreateSnapshotRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Snapshot.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -204,6 +217,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setRequestMarshaller(
ProtoUtils.marshaller(UpdateSnapshotRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Snapshot.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -214,6 +228,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setRequestMarshaller(
ProtoUtils.marshaller(DeleteSnapshotRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor seekMethodDescriptor =
@@ -222,6 +237,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setFullMethodName("google.pubsub.v1.Subscriber/Seek")
.setRequestMarshaller(ProtoUtils.marshaller(SeekRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(SeekResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor setIamPolicyMethodDescriptor =
@@ -230,6 +246,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy")
.setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor getIamPolicyMethodDescriptor =
@@ -238,6 +255,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
.setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy")
.setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -249,6 +267,7 @@ public class GrpcSubscriberStub extends SubscriberStub {
ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private final UnaryCallable createSubscriptionCallable;
diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java
index 559b72822..335ccbdc3 100644
--- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java
+++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java
@@ -587,7 +587,6 @@ private StreamingSubscriberConnection getStreamingSubscriberConnectionFromBuilde
.setFlowController(mock(FlowController.class))
.setExecutor(executor)
.setSystemExecutor(systemExecutor)
- .setEodAckCallbackExecutor(systemExecutor)
.setClock(clock)
.setMinDurationPerAckExtension(Subscriber.DEFAULT_MIN_ACK_DEADLINE_EXTENSION)
.setMinDurationPerAckExtensionDefaultUsed(true)
diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml
index 8ca5debdf..2f7a440ec 100644
--- a/grpc-google-cloud-pubsub-v1/pom.xml
+++ b/grpc-google-cloud-pubsub-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-pubsub-v1
- 1.123.2
+ 1.123.3
grpc-google-cloud-pubsub-v1
GRPC library for grpc-google-cloud-pubsub-v1
com.google.cloud
google-cloud-pubsub-parent
- 1.141.2
+ 1.141.3
diff --git a/pom.xml b/pom.xml
index af9faf125..58167a983 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-pubsub-parent
pom
- 1.141.2
+ 1.141.3
Google Cloud Pub/Sub Parent
https://github.com/googleapis/java-pubsub
@@ -14,7 +14,7 @@
com.google.cloud
sdk-platform-java-config
- 3.51.0
+ 3.52.0
@@ -69,17 +69,17 @@
com.google.api.grpc
proto-google-cloud-pubsub-v1
- 1.123.2
+ 1.123.3
com.google.api.grpc
grpc-google-cloud-pubsub-v1
- 1.123.2
+ 1.123.3
com.google.cloud
google-cloud-pubsub
- 1.141.2
+ 1.141.3
@@ -116,7 +116,7 @@
org.assertj
assertj-core
- 3.27.3
+ 3.27.4
test
diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml
index 2aaa7f1ba..faabcab1c 100644
--- a/proto-google-cloud-pubsub-v1/pom.xml
+++ b/proto-google-cloud-pubsub-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-pubsub-v1
- 1.123.2
+ 1.123.3
proto-google-cloud-pubsub-v1
PROTO library for proto-google-cloud-pubsub-v1
com.google.cloud
google-cloud-pubsub-parent
- 1.141.2
+ 1.141.3
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 1607800bc..50d75d8ff 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -44,7 +44,7 @@
com.google.cloud
google-cloud-pubsub
- 1.141.1
+ 1.141.2
@@ -75,23 +75,23 @@
com.google.protobuf
protobuf-java-util
- 4.31.1
+ 4.32.0
com.google.cloud
google-cloud-core
- 2.59.0
+ 2.60.0
tests
com.google.cloud
google-cloud-bigquery
- 2.54.0
+ 2.54.1
com.google.cloud
google-cloud-storage
- 2.54.0
+ 2.55.0
com.google.cloud.opentelemetry
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index ba0abd057..293119b78 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -43,7 +43,7 @@
com.google.cloud
google-cloud-pubsub
- 1.141.2
+ 1.141.3
@@ -61,7 +61,7 @@
com.google.protobuf
protobuf-java-util
- 4.31.1
+ 4.32.0
@@ -79,18 +79,18 @@
com.google.cloud
google-cloud-core
- 2.59.0
+ 2.60.0
tests
com.google.cloud
google-cloud-bigquery
- 2.54.0
+ 2.54.1
com.google.cloud
google-cloud-storage
- 2.54.0
+ 2.55.0
com.google.cloud.opentelemetry
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index ab18a0351..387d07524 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -45,7 +45,7 @@
com.google.cloud
libraries-bom
- 26.65.0
+ 26.66.0
pom
import
@@ -85,7 +85,7 @@
com.google.protobuf
protobuf-java-util
- 4.31.1
+ 4.32.0
@@ -103,7 +103,7 @@
com.google.cloud
google-cloud-core
- 2.59.0
+ 2.60.0
tests
diff --git a/samples/snippets/src/test/java/pubsub/AdminIT.java b/samples/snippets/src/test/java/pubsub/AdminIT.java
index 60c85f340..2d31e17f7 100644
--- a/samples/snippets/src/test/java/pubsub/AdminIT.java
+++ b/samples/snippets/src/test/java/pubsub/AdminIT.java
@@ -33,6 +33,7 @@
import com.google.cloud.bigquery.TableInfo;
import com.google.cloud.pubsub.v1.SubscriptionAdminClient;
import com.google.cloud.pubsub.v1.TopicAdminClient;
+import com.google.protobuf.Duration;
import com.google.pubsub.v1.SubscriptionName;
import com.google.pubsub.v1.TopicName;
import java.io.ByteArrayOutputStream;
@@ -73,6 +74,12 @@ public class AdminIT {
"java_samples_data_set" + _suffix.replace("-", "_");
private static final String bigquerySubscriptionId = "iam-bigquery-subscription-" + _suffix;
private static final String bigqueryTableId = "java_samples_table_" + _suffix;
+ private static final String cloudStorageSubscriptionId =
+ "iam-cloud-storage-subscription-" + _suffix;
+ private static final String cloudStorageFilenamePrefix = "log_events_";
+ private static final String cloudStorageFilenameSuffix = ".txt";
+ private static final Duration cloudStorageMaxDuration =
+ Duration.newBuilder().setSeconds(300).build();
private static final String gcpServiceAccount =
"fake-service-account@fake-gcp-project.iam.gserviceaccount.com";
// AWS Kinesis ingestion settings.
@@ -322,6 +329,22 @@ public void testAdmin() throws Exception {
assertThat(bout.toString()).contains("Created a BigQuery subscription:");
assertThat(bout.toString()).contains(bigqueryTablePath);
+ bout.reset();
+ // Test create a Cloud Storage subscription.
+ CreateCloudStorageSubscriptionExample.createCloudStorageSubscription(
+ projectId,
+ topicId,
+ cloudStorageSubscriptionId,
+ cloudStorageBucket,
+ cloudStorageFilenamePrefix,
+ cloudStorageFilenameSuffix,
+ cloudStorageMaxDuration);
+ assertThat(bout.toString()).contains("Created a CloudStorage subscription:");
+ assertThat(bout.toString()).contains(cloudStorageBucket);
+ assertThat(bout.toString()).contains(cloudStorageFilenamePrefix);
+ assertThat(bout.toString()).contains(cloudStorageFilenameSuffix);
+ assertThat(bout.toString()).contains(Long.toString(cloudStorageMaxDuration.getSeconds()));
+
bout.reset();
// Test delete subscription.
DeleteSubscriptionExample.deleteSubscriptionExample(projectId, pullSubscriptionId);
@@ -329,6 +352,7 @@ public void testAdmin() throws Exception {
DeleteSubscriptionExample.deleteSubscriptionExample(projectId, orderedSubscriptionId);
DeleteSubscriptionExample.deleteSubscriptionExample(projectId, exactlyOnceSubscriptionId);
DeleteSubscriptionExample.deleteSubscriptionExample(projectId, bigquerySubscriptionId);
+ DeleteSubscriptionExample.deleteSubscriptionExample(projectId, cloudStorageSubscriptionId);
assertThat(bout.toString()).contains("Deleted subscription.");
bout.reset();
diff --git a/versions.txt b/versions.txt
index 8e8325a1c..9f2f9ca64 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,6 +1,6 @@
# Format:
# module:released-version:current-version
-google-cloud-pubsub:1.141.2:1.141.2
-grpc-google-cloud-pubsub-v1:1.123.2:1.123.2
-proto-google-cloud-pubsub-v1:1.123.2:1.123.2
+google-cloud-pubsub:1.141.3:1.141.3
+grpc-google-cloud-pubsub-v1:1.123.3:1.123.3
+proto-google-cloud-pubsub-v1:1.123.3:1.123.3