Skip to content
Permalink
Browse files
fix: add a default value for max outstanding request bytes flow contr…
…ol setting (#96)

* adding default max outstanding request bytes
  • Loading branch information
hannahrogers-google committed Feb 24, 2020
1 parent 19fde3a commit 4a6046c2b03ad1d7e08d6e6dc0d1817cbffc5283
Showing with 4 additions and 1 deletion.
  1. +4 −1 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java
@@ -416,7 +416,10 @@ public static final class Builder {
private Duration maxAckExtensionPeriod = DEFAULT_MAX_ACK_EXTENSION_PERIOD;

private FlowControlSettings flowControlSettings =
FlowControlSettings.newBuilder().setMaxOutstandingElementCount(1000L).build();
FlowControlSettings.newBuilder()
.setMaxOutstandingElementCount(1000L)
.setMaxOutstandingRequestBytes(100L * 1024L * 1024L) // 100MB
.build();

private ExecutorProvider executorProvider = DEFAULT_EXECUTOR_PROVIDER;
private ExecutorProvider systemExecutorProvider = null;

0 comments on commit 4a6046c

Please sign in to comment.