in Amazon.KinesisTap.AWS/AWSEventSinkFactory.cs [346:406]
public void ParseBufferedSinkOptions(IConfiguration config, AWSBufferedSinkOptions options)
{
options.TextDecoration = config[ConfigConstants.TEXT_DECORATION];
options.TextDecorationEx = config[ConfigConstants.TEXT_DECORATION_EX];
options.ObjectDecoration = config[ConfigConstants.OBJECT_DECORATION];
options.ObjectDecorationEx = config[ConfigConstants.OBJECT_DECORATION_EX];
options.Format = config[ConfigConstants.FORMAT];
options.SecondaryQueueType = config[ConfigConstants.QUEUE_TYPE];
if (int.TryParse(config[ConfigConstants.BUFFER_INTERVAL], out var bufferInterval))
{
options.BufferIntervalMs = bufferInterval * 1000;
}
if (int.TryParse(config[ConfigConstants.BUFFER_INTERVAL_MS], out var bufferIntervalMs))
{
options.BufferIntervalMs = bufferIntervalMs;
}
// this is problematic but BufferSize actually refers to max batch size
if (int.TryParse(config[ConfigConstants.BUFFER_SIZE], out var bufferSize))
{
options.MaxBatchSize = bufferSize;
}
// we'll make BufferSizeItems the setting for actual number of items in queue
if (int.TryParse(config[ConfigConstants.BUFFER_SIZE_ITEMS], out var bufferSizeItems))
{
options.QueueSizeItems = bufferSizeItems;
}
if (int.TryParse(config["MaxAttempts"], out var maxAttempts))
{
options.MaxAttempts = maxAttempts;
}
if (double.TryParse(config["JittingFactor"], out var jittingFactor))
{
options.JittingFactor = jittingFactor;
}
if (double.TryParse(config["BackoffFactor"], out var backoffFactor))
{
options.BackoffFactor = backoffFactor;
}
if (double.TryParse(config["RecoveryFactor"], out var recoveryFactor))
{
options.RecoveryFactor = recoveryFactor;
}
if (double.TryParse(config["MinRateAdjustmentFactor"], out var minRateAdjustmentFactor))
{
options.MinRateAdjustmentFactor = minRateAdjustmentFactor;
}
if (int.TryParse(config[ConfigConstants.UPLOAD_NETWORK_PRIORITY], out var uploadPriority))
{
options.UploadNetworkPriority = uploadPriority;
}
}