예제 #1
0
 public OnBoardingAccountEnableTask(ILogger <OnBoardingAccountEnableTask> logger,
                                    ISQSConfiguration sqsConfig, IUserOnBoardingService service)
 {
     _logger    = logger;
     _sqsConfig = sqsConfig;
     _service   = service;
 }
예제 #2
0
 public static ReceiveMessageRequest ToOnBoardingPremiumRequest(this ISQSConfiguration sqsConfig, int waitTimeSeconds = 5)
 => new ReceiveMessageRequest
 {
     QueueUrl            = sqsConfig.UserOnBoardingPremium,
     WaitTimeSeconds     = waitTimeSeconds,
     MaxNumberOfMessages = 1,
 };
예제 #3
0
 public SQSQueueSender(ISQSConfiguration configuration, IAmazonSQS sqs)
 {
     _name       = configuration.Name;
     _queueUrl   = configuration.QueueUrl;
     _compressed = configuration.Compressed;
     _sqs        = sqs;
 }
예제 #4
0
 public static ReceiveMessageRequest ToReceiveMessageRequest(this ISQSConfiguration sqsConfig, int waitTimeSeconds = 5)
 => new ReceiveMessageRequest
 {
     QueueUrl            = sqsConfig.Validation,
     WaitTimeSeconds     = waitTimeSeconds,
     MaxNumberOfMessages = 1,
 };
예제 #5
0
        public SQSQueueReceiver(ISQSConfiguration configuration, IAmazonSQS sqs)
        {
            _name             = configuration.Name;
            _queueUrl         = configuration.QueueUrl;
            _maxMessages      = configuration.MaxMessages;
            _autoAcknwoledge  = configuration.AutoAcknowledge;
            _parallelHandling = configuration.ParallelHandling;

            _sqs = sqs;

            _worker = new Thread(DoStuff);
        }
예제 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SQSQueueReceiver"/> class.
        /// </summary>
        /// <param name="configuration">An object that defines the configuration of this istance.</param>
        /// <param name="sqs">An object that communicates with SQS.</param>
        public SQSQueueSender(ISQSConfiguration configuration, IAmazonSQS sqs)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }
            if (sqs == null)
            {
                throw new ArgumentNullException(nameof(sqs));
            }

            _name       = configuration.Name;
            _queueUrl   = configuration.QueueUrl;
            _compressed = configuration.Compressed;
            _sqs        = sqs;
        }
예제 #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SQSQueueReceiver"/> class.
        /// </summary>
        /// <param name="configuration">An object that defines the configuration of this istance.</param>
        /// <param name="sqs">An object that communicates with SQS.</param>
        public SQSQueueReceiver(ISQSConfiguration configuration, IAmazonSQS sqs)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }
            if (sqs == null)
            {
                throw new ArgumentNullException(nameof(sqs));
            }

            _name             = configuration.Name;
            _queueUrl         = configuration.QueueUrl;
            _maxMessages      = configuration.MaxMessages;
            _autoAcknwoledge  = configuration.AutoAcknowledge;
            _parallelHandling = configuration.ParallelHandling;

            _sqs = sqs;

            _worker = new Thread(DoStuff);
        }
예제 #8
0
        public SQSQueueReceiver(ISQSConfiguration configuration, IAmazonSQS sqs)
        {
            _name            = configuration.Name;
            _queueUrl        = configuration.QueueUrl;
            _maxMessages     = configuration.MaxMessages;
            _autoAcknwoledge = configuration.AutoAcknowledge;

            _sqs = sqs;

            _worker = new Thread(DoStuff);

            _logger = new Lazy <ILogger>(() =>
            {
                try
                {
                    return(LoggerFactory.GetInstance());
                }
                catch
                {
                    return(null);
                }
            });
        }
예제 #9
0
 public Worker(ILogger <Worker> logger, ISQSConfiguration sqsConfig, IValidationIterator iterator)
 {
     _logger    = logger;
     _sqsConfig = sqsConfig;
     _iterator  = iterator;
 }