Пример #1
0
 public SQSClientProvider(ISQSConfig config)
 {
     this.config    = config;
     this.awsConfig = new AmazonSQSConfig
     {
         ServiceURL = this.config.ServiceURL,
     };
     this.sqsClientLazy = new Lazy <AmazonSQSClient>(() => new AmazonSQSClient(this.config.AwsAccessKeyId, this.config.AwsSecretAccessKey, this.awsConfig), true);
 }
Пример #2
0
 public SQSMessageSender(
     ISQSConfig config,
     ILogger logger,
     ISystemClock clock,
     ISQSClientProvider sqsClientProvider,
     ISendMessageRequestFactory sendMessageRequestFactory)
 {
     this.config                    = config;
     this.clock                     = clock;
     this.logger                    = logger;
     this.sqsClientProvider         = sqsClientProvider;
     this.sendMessageRequestFactory = sendMessageRequestFactory;
 }
Пример #3
0
 public SQSSubscriber(
     ISQSConfig config,
     ILogger logger,
     ISystemClock clock,
     ISQSClientProvider sqsClientProvider,
     ISendMessageRequestFactory sendMessageRequestFactory,
     CancellationTokenSource tokenSource,
     ITypeHelper typeHelper,
     IScopeProvider scopeProvider)
 {
     this.config                    = config;
     this.clock                     = clock;
     this.logger                    = logger;
     this.sqsClientProvider         = sqsClientProvider;
     this.sendMessageRequestFactory = sendMessageRequestFactory;
     this.tokenSource               = tokenSource;
     this.typeHelper                = typeHelper;
     this.scopeProvider             = scopeProvider;
     this.semaphoreSlim             = config.MaxConcurrencyReceive > 0 ? new SemaphoreSlim(config.MaxConcurrencyReceive) : null;
 }
 public SendMessageRequestFactory(ISQSConfig config, ISQSHelper sqsHelper)
 {
     this.config    = config;
     this.sqsHelper = sqsHelper;
 }