hlteoh37 commented on code in PR #20245:
URL: https://github.com/apache/flink/pull/20245#discussion_r940104680


##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -256,14 +243,42 @@ public AsyncSinkWriter(
             long maxTimeInBufferMS,
             long maxRecordSizeInBytes,
             Collection<BufferedRequestState<RequestEntryT>> states) {
+        this(
+                elementConverter,
+                context,
+                maxBatchSize,
+                maxBufferedRequests,
+                maxBatchSizeInBytes,
+                maxTimeInBufferMS,
+                maxRecordSizeInBytes,
+                states,
+                CongestionControlRateLimitingStrategy.builder()
+                        .setMaxInFlightRequests(maxInFlightRequests)
+                        .setInitialMaxInFlightMessages(maxBatchSize)
+                        .setAimdScalingStrategy(
+                                AIMDScalingStrategy.builder()
+                                        .setRateThreshold(maxBatchSize * 
maxInFlightRequests)
+                                        .build())
+                        .build());
+    }
+
+    public AsyncSinkWriter(
+            ElementConverter<InputT, RequestEntryT> elementConverter,
+            Sink.InitContext context,
+            int maxBatchSize,
+            int maxBufferedRequests,
+            long maxBatchSizeInBytes,
+            long maxTimeInBufferMS,
+            long maxRecordSizeInBytes,
+            Collection<BufferedRequestState<RequestEntryT>> states,
+            RateLimitingStrategy rateLimitingStrategy) {

Review Comment:
   We're writing a blog post about it instead (for now) 
https://issues.apache.org/jira/browse/FLINK-25208
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to