Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We will also migrate the existing Firehose and Kinesis sinks to use the new interface proposed here. There will be no change in behaviour, since the CongestionControlRateLimitingStrategy configured will be the same as the current strategy.

Example usage of RateLimitingStrategy

This logic will be in the AsyncSinkWriter, but this is an example use case for the interface proposed here

Code Block
languagejava
titleRateLimitingStrategy
RequestInfo info = buildRequestInfo(strategy.getMaxBatchSize());

while (strategy.shouldBlock(info)) {
    sleep();
    info = buildRequestInfo(req);
}

strategy.registerInFlightRequest(info);

// Send the batch

strategy.registerCompletedRequest(info);

Compatibility, Deprecation, and Migration Plan

...