Example #1
0
        public void Initialise(
            IUploadAllocationFileMonitor uploadAllocationFileMonitor,
            IUploadTradeFileMonitor uploadTradeFileMonitor,
            IUploadEtlFileMonitor uploadEtlFileMonitor)
        {
            try
            {
                this._logger.LogInformation("Initialising file upload monitoring process");

                this._uploadAllocationFileMonitor = uploadAllocationFileMonitor;
                this._uploadTradeFileMonitor      = uploadTradeFileMonitor;
                this._uploadEtlFileMonitor        = uploadEtlFileMonitor;
                this._cts   = new CancellationTokenSource();
                this._token = new AwsResusableCancellationToken();

                this._queueClient.SubscribeToQueueAsync(
                    this._configuration.DataImportS3UploadQueueName,
                    this.ReadMessage,
                    this._cts.Token,
                    this._token);
            }
            catch (Exception e)
            {
                this._logger.LogError(e, $"S3FileUploadMonitoringProcess");
            }
        }
        public void Initiate()
        {
            this._messageBusCts?.Cancel();

            this._messageBusCts = new CancellationTokenSource();
            this._token         = new AwsResusableCancellationToken();

            this._awsQueueClient.SubscribeToQueueAsync(
                this._awsConfiguration.ScheduleRuleDistributedWorkQueueName,
                async(s1, s2) => { await this.ExecuteDistributedMessage(s1, s2); },
                this._messageBusCts.Token,
                this._token);
        }
        /// <summary>
        /// The initiate.
        /// </summary>
        public void Initiate()
        {
            this.logger.LogInformation("initiating");
            this.messageBusCancellationTokenSource?.Cancel();
            this.messageBusCancellationTokenSource = new CancellationTokenSource();
            this.token = new AwsResusableCancellationToken();

            this.awsQueueClient.SubscribeToQueueAsync(
                this.awsConfiguration.ScheduledRuleQueueName,
                async(s1, s2) => { await this.ExecuteNonDistributedMessage(s1, s2); },
                this.messageBusCancellationTokenSource.Token,
                this.token);

            this.logger.LogInformation("completed initiating");
        }
        /// <summary>
        /// The initiate.
        /// </summary>
        public void Initiate()
        {
            this.logger.LogInformation("QueueSubscriber initiating");
            this.messageBusCancellationTokenSource?.Cancel();
            this.messageBusCancellationTokenSource = new CancellationTokenSource();
            this.token = new AwsResusableCancellationToken();

            this.awsQueueClient.SubscribeToQueueAsync(
                this.awsConfiguration.UploadCoordinatorQueueName,
                async(s1, s2) => { await this.ExecuteCoordinationMessageAsync(s1, s2); },
                this.messageBusCancellationTokenSource.Token,
                this.token);

            this.logger.LogInformation("QueueSubscriber completed initiating");
        }
Example #5
0
        public void Initiate()
        {
            this._logger?.LogInformation($"Initiating {nameof(QueueRuleCancellationSubscriber)}");

            this._messageBusCts?.Cancel();
            this._messageBusCts = new CancellationTokenSource();
            this._token         = new AwsResusableCancellationToken();

            this._awsQueueClient.SubscribeToQueueAsync(
                this._awsConfiguration.ScheduleRuleCancellationQueueName,
                async(a, b) => { await this.ExecuteCancellationMessage(a, b); },
                this._messageBusCts.Token,
                this._token);

            this._logger?.LogInformation($"Initiating {nameof(QueueRuleCancellationSubscriber)} completed");
        }
        public void Initiate()
        {
            this._logger.LogInformation($"{nameof(DataRequestSubscriber)} initiate beginning");

            this._messageBusCts?.Cancel();

            this._messageBusCts = new CancellationTokenSource();
            this._token         = new AwsResusableCancellationToken();

            this._awsQueueClient.SubscribeToQueueAsync(
                this._awsConfiguration.DataSynchroniserRequestQueueName,
                async(s1, s2) => { await this.Execute(s1, s2); },
                this._messageBusCts.Token,
                this._token);

            this._logger.LogInformation($"{nameof(DataRequestSubscriber)} initiate completed");
        }