Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

hannahrogers-google
Copy link
Contributor

Updating the Publish Batch settings to be consistent with the rest of the CPS client libs.

Updating the Publish Batch settings to be consistent with the rest of the CPS client libs.
@hannahrogers-google hannahrogers-google requested a review from a team as a code owner November 10, 2021 20:05
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/java-pubsub API. label Nov 10, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 10, 2021
Copy link
Contributor

@anguillanneuf anguillanneuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to make sure it's consistent across languages (1 MB)

@@ -655,8 +655,8 @@ public static Builder newBuilder(String topicName) {

// 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
Copy link
Contributor

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

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);
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

@anguillanneuf anguillanneuf added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Feb 3, 2022
@mmicatka
Copy link
Contributor

I am going to close this pull request as kamal mentioned above, we are going to hold off on these changes.

@mmicatka mmicatka closed this Jun 24, 2022
@mmicatka mmicatka deleted the hannahrogers-google-patch-2 branch October 14, 2022 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/java-pubsub API. cla: yes This human has signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants