public AwsSqsFacade()

in functions/source/real-time-adherence/AspectKinesisLamda/AwsSQSFacade.cs [35:65]


        public AwsSqsFacade(IAspectLogger logger)
        {
            _logger = logger;
            _sqsClient = new AmazonSQSClient();
            var numQueuesStr = Environment.GetEnvironmentVariable(NUM_SQS_QUEUES_ENVIRONMENT_VARIABLE_LOOKUP);
            if (string.IsNullOrEmpty(numQueuesStr))
            {
                throw new Exception($"Missing Lambda Variable {NUM_SQS_QUEUES_ENVIRONMENT_VARIABLE_LOOKUP}");
            }
            if (!int.TryParse(numQueuesStr, out _numSqsQueues) || _numSqsQueues < 1)
            {
                throw new Exception($"Invalid Lambda Variable {NUM_SQS_QUEUES_ENVIRONMENT_VARIABLE_LOOKUP}: value must be a positive integer");
            }

            _sqsQueueUrls = new string[_numSqsQueues];

            for (int i = 0; i < _numSqsQueues; ++i)
            {
                _sqsQueueUrls[i] = ParseQueue(i+1);
                _logger.Debug($"SqsQueueUrl{i+1}: {_sqsQueueUrls[i]}");
            }

            _sqsQueueMessageGroupId = Environment.GetEnvironmentVariable(SQS_QUEUE_MESSAGE_GROUP_ID_ENVIRONMENT_VARIABLE_LOOKUP);
            if (string.IsNullOrEmpty(_sqsQueueMessageGroupId))
            {
                throw new Exception($"Missing Lambda Variable {SQS_QUEUE_MESSAGE_GROUP_ID_ENVIRONMENT_VARIABLE_LOOKUP}");
            }
            _sqsQueueMessageGroupId = _sqsQueueMessageGroupId.Trim();
            _logger.Debug($"SqsQueueMessagGroupId: {_sqsQueueMessageGroupId}");
                       
        }