private static async Task <SqsQueue> GetSqsQueueFromSqsQueueNameAsync(ISqsClientHandler sqsClientHandler, string queueName) { var queueOptions = GetSqsOptions(queueName); return(new SqsQueue { QueueName = queueName, DelaySeconds = queueOptions.DelaySeconds, MaximumMessageSize = queueOptions.MaximumMessageSize, NumberOfThreads = queueOptions.NumberOfThreads, ReceiveMessageWaitTimeSeconds = queueOptions.ReceiveMessageWaitTimeSeconds, Url = string.IsNullOrEmpty(queueOptions.Url) ? await sqsClientHandler.GetQueueUrl(queueOptions.QueueName).ConfigureAwait(false) : queueOptions.Url, UseFifo = queueOptions.UseFifo, RedrivePolicy = new QueueRedrivePolicy { DeadLetterQueueUrl = queueOptions.RedrivePolicy.DeadLetterQueueUrl, MaxReceiveCount = queueOptions.RedrivePolicy.MaxReceiveCount } }); }
public SqsConsumerSample(IServiceCollection services, ISqsClientHandler sqsClientHandler, SqsQueue sqsQueue) : base(services, sqsClientHandler, sqsQueue) { }
protected SqsMessageConsumerHandler(IServiceCollection services, ISqsClientHandler sqsClientHandler, SqsQueue sqsQueue) { SqsClientHandler = sqsClientHandler; Services = services; SqsQueue = sqsQueue; }
public SqsSample(ISqsClientHandler sqsClientHandler, IOptions <AwsOptions> options) { SqsClientHandler = sqsClientHandler; AwsOptions = options.Value; }