From 84e37df6c813a0c2f10a41a64d83b369e82cdb14 Mon Sep 17 00:00:00 2001 From: hannahrogers-google <52459909+hannahrogers-google@users.noreply.github.com> Date: Wed, 10 Nov 2021 15:04:55 -0500 Subject: [PATCH] fix: update the publisher batch settings Updating the Publish Batch settings to be consistent with the rest of the CPS client libs. --- .../src/main/java/com/google/cloud/pubsub/v1/Publisher.java | 4 ++-- 1 file 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 1ed5e2254..f59333dd3 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 @@ -655,8 +655,8 @@ public static final class Builder { // Meaningful defaults. static final long DEFAULT_ELEMENT_COUNT_THRESHOLD = 100L; - static final long DEFAULT_REQUEST_BYTES_THRESHOLD = 1000L; // 1 kB - static final Duration DEFAULT_DELAY_THRESHOLD = Duration.ofMillis(1); + static final long DEFAULT_REQUEST_BYTES_THRESHOLD = 1L * 1024L * 1024L; // 1 MB + static final Duration DEFAULT_DELAY_THRESHOLD = Duration.ofMillis(10); private static final Duration DEFAULT_INITIAL_RPC_TIMEOUT = Duration.ofSeconds(5); private static final Duration DEFAULT_MAX_RPC_TIMEOUT = Duration.ofSeconds(60); private static final Duration DEFAULT_TOTAL_TIMEOUT = Duration.ofSeconds(600);