-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update the publisher batch settings #908
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upon reflection, I think we have to hold off on changing this value until v2.0 of the library. For users who are not hitting the batch size limit, this will represent a ~10x increase in publish latency if they are using the default settings. It will be hard for users to understand where that is coming from in the absence of client-side metrics. |
||
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); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be 1 * 1000 * 1000? 1 MB as shown in go/cps-libs-defaults
Python just updated the docstring to 1 MB here: googleapis/python-pubsub#572