Skip to content

Conversation

@anguillanneuf
Copy link
Contributor

Matching defaults in sample comments with real defaults in the client library.

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 BatchingSettings DEFAULT_BATCHING_SETTINGS =
BatchingSettings.newBuilder()
.setDelayThreshold(DEFAULT_DELAY_THRESHOLD)
.setRequestByteThreshold(DEFAULT_REQUEST_BYTES_THRESHOLD)
.setElementCountThreshold(DEFAULT_ELEMENT_COUNT_THRESHOLD)
.setFlowControlSettings(
FlowControlSettings.newBuilder()
.setLimitExceededBehavior(FlowController.LimitExceededBehavior.Ignore)
.build())

@product-auto-label product-auto-label bot added api: pubsub Issues related to the googleapis/java-pubsub API. samples Issues that are directly related to samples. labels Feb 14, 2022
@anguillanneuf anguillanneuf requested review from a team and mmicatka February 14, 2022 22:59
Copy link
Contributor

@mmicatka mmicatka left a comment

Choose a reason for hiding this comment

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

LGTM

@anguillanneuf anguillanneuf merged commit 0c452aa into main Feb 15, 2022
@anguillanneuf anguillanneuf deleted the anguillanneuf-patch-1 branch February 15, 2022 16:47
rajanya-google pushed a commit to rajanya-google/java-pubsub that referenced this pull request Feb 16, 2022
* samples: DEFAULT_REQUEST_BYTES_THRESHOLD default

* typo
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. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants