pubsub: standardize publish delay threshold and max extension
As an effort to standardize client library defaults across languages
for Pub/Sub, we're making the following changes:
DefaultReceiveSettings.MaxExtension: 10min -> 60min
DefalutPublishSettings.DelayThreshold: 1ms -> 10ms
These changes should not have an adverse effect
on users as they have been the default for the Java
and Python client libraries for a while now.
Change-Id: I5a0a940f97bb68dee2f893e55dbfc56966d7cc93
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/49992
Reviewed-by: Cody Oss <codyoss@google.com>
Reviewed-by: kokoro <noreply+kokoro@google.com>
diff --git a/pubsub/subscription.go b/pubsub/subscription.go
index c9f1480..c7239e7 100644
--- a/pubsub/subscription.go
+++ b/pubsub/subscription.go
@@ -374,7 +374,7 @@
// DefaultReceiveSettings holds the default values for ReceiveSettings.
var DefaultReceiveSettings = ReceiveSettings{
- MaxExtension: 10 * time.Minute,
+ MaxExtension: 60 * time.Minute,
MaxExtensionPeriod: -1,
MaxOutstandingMessages: 1000,
MaxOutstandingBytes: 1e9, // 1G
diff --git a/pubsub/topic.go b/pubsub/topic.go
index e03e227..cf8fc5d 100644
--- a/pubsub/topic.go
+++ b/pubsub/topic.go
@@ -97,7 +97,7 @@
// DefaultPublishSettings holds the default values for topics' PublishSettings.
var DefaultPublishSettings = PublishSettings{
- DelayThreshold: 1 * time.Millisecond,
+ DelayThreshold: 10 * time.Millisecond,
CountThreshold: 100,
ByteThreshold: 1e6,
Timeout: 60 * time.Second,