Esempio n. 1
0
 public SqsQueueSubscriber(
     IAmazonSQS sqsClient,
     IServiceProvider serviceProvider,
     SqsSubscriptionConfiguration <T> sqsSubscriptionConfiguration,
     List <string> messageAttributeNames,
     CancellationTokenSource cancellationTokenSource)
 {
     _sqsClient       = sqsClient;
     _serviceProvider = serviceProvider;
     _sqsSubscriptionConfiguration = sqsSubscriptionConfiguration;
     _messageAttributeNames        = messageAttributeNames;
     _cancellationTokenSource      = cancellationTokenSource;
 }
Esempio n. 2
0
 private async Task SubscribeAsync <T>(SqsSubscriptionConfiguration <T> config, IAmazonSQS sqsClient, BoosterConfiguration boosterConfig) where T : IEvent
 {
     await new SqsQueueSubscriber <T>(
         sqsClient, boosterConfig.ServiceProvider, config, new List <string>(), new CancellationTokenSource())
     .SqsSubscribeAsync <T>();
 }