|
104 | 104 | * </code></pre> |
105 | 105 | */ |
106 | 106 | public class Publisher { |
107 | | - /** The maximum number of messages in one request. Defined by the API. */ |
108 | | - public static long getApiMaxRequestElementCount() { |
109 | | - return 1000L; |
110 | | - } |
111 | | - |
112 | | - /** The maximum size of one request. Defined by the API. */ |
113 | | - public static long getApiMaxRequestBytes() { |
114 | | - return 10L * 1000L * 1000L; // 10 megabytes (https://en.wikipedia.org/wiki/Megabyte) |
115 | | - } |
116 | | - |
117 | 107 | private static final Logger logger = Logger.getLogger(Publisher.class.getName()); |
118 | 108 |
|
119 | 109 | private final TopicName topicName; |
@@ -142,6 +132,16 @@ public static long getApiMaxRequestBytes() { |
142 | 132 | private final MessageWaiter messagesWaiter; |
143 | 133 | private ScheduledFuture<?> currentAlarmFuture; |
144 | 134 |
|
| 135 | + /** The maximum number of messages in one request. Defined by the API. */ |
| 136 | + public static long getApiMaxRequestElementCount() { |
| 137 | + return 1000L; |
| 138 | + } |
| 139 | + |
| 140 | + /** The maximum size of one request. Defined by the API. */ |
| 141 | + public static long getApiMaxRequestBytes() { |
| 142 | + return 10L * 1000L * 1000L; // 10 megabytes (https://en.wikipedia.org/wiki/Megabyte) |
| 143 | + } |
| 144 | + |
145 | 145 | private Publisher(Builder builder) throws IOException { |
146 | 146 | topicName = builder.topicName; |
147 | 147 | cachedTopicNameString = topicName.toString(); |
@@ -574,7 +574,7 @@ public long nextLong(long least, long bound) { |
574 | 574 |
|
575 | 575 | // Client-side flow control options |
576 | 576 | FlowControlSettings flowControlSettings = FlowControlSettings.getDefaultInstance(); |
577 | | - boolean failOnFlowControlLimits = false; |
| 577 | + boolean failOnFlowControlLimits; |
578 | 578 |
|
579 | 579 | RetrySettings retrySettings = DEFAULT_RETRY_SETTINGS; |
580 | 580 | LongRandom longRandom = DEFAULT_LONG_RANDOM; |
|
0 commit comments