public SqsBatchDeleter(SqsBatchDeletionOptions sqsBatchDeletionOptions, IAmazonSQS amazonSqs, IExceptionHandler exceptionHandler, IFailedDeletionEntryHandler failedDeletionEntryHandler, Channel <Message> channel) { _ = sqsBatchDeletionOptions ?? throw new ArgumentNullException(nameof(sqsBatchDeletionOptions)); _sqsBatchDeletionOptions = sqsBatchDeletionOptions.Clone(); _amazonSqs = amazonSqs ?? throw new ArgumentNullException(nameof(amazonSqs)); _failedDeletionEntryHandler = failedDeletionEntryHandler ?? DefaultFailedDeletionEntryHandler.Instance; _exceptionHandler = exceptionHandler ?? DefaultExceptionHandler.Instance; _channel = channel ?? Channel.CreateBounded <Message>(new BoundedChannelOptions(_sqsBatchDeletionOptions.ChannelCapacity) { SingleReader = true }); _currentBatch = new Dictionary <string, string>(sqsBatchDeletionOptions.BatchSize); _deleteMessageBatchRequest = new DeleteMessageBatchRequest { QueueUrl = sqsBatchDeletionOptions.QueueUrl }; }
public SqsBatchDeleter(SqsBatchDeletionOptions sqsBatchDeletionOptions, IAmazonSQS amazonSqs, IExceptionHandler exceptionHandler, IFailedDeletionEntryHandler failedDeletionEntryHandler) : this(sqsBatchDeletionOptions, amazonSqs, exceptionHandler, failedDeletionEntryHandler, null) { }