예제 #1
0
        /// <summary>
        /// Start point of the service
        /// </summary>
        public void Start()
        {
            carService.Initialise();

            //TODO: Initialise with correct queue and exchange name
            carRequestQueueConsumer.Subscribe(adapterConfiguration.InboundQueueName);

            Log.Information("A2IA Adapter Service Started");
        }
예제 #2
0
        /// <summary>
        /// Start point of the service
        /// </summary>
        public void Start()
        {
            //TODO: Initialise correctly
            carService.Initialise(adapterConfiguration.ParameterPath, adapterConfiguration.TablePath, adapterConfiguration.CpuNames.Split(','), true, true, false);

            //TODO: Initiliase with correct queue and exchange name
            carRequestQueueConsumer.Subscribe(adapterConfiguration.InboundQueueName);
            carResponseExchangePublisher.Declare(adapterConfiguration.OutboundQueueName);

            Log.Information("A2IA Adapter Service Started");
        }
예제 #3
0
        public void Start()
        {
            if (adapterConfig.HandleValidateCodelineRequest)
            {
                Log.Information("This service will handle validate codeline requests");
                validateCodelineRequestQueue.Subscribe(adapterConfig.ValidateCodelineQueueName);
            }

            if (adapterConfig.HandleValidateCodelineResponse)
            {
                Log.Information("This service will handle validate codeline responses");
                validateCodelineExchange.Declare(adapterConfig.ValidateCodelineExchangeName);
                StartValidateCodelineResponsePollingJob();
            }

            if (adapterConfig.HandleCorrectCodelineRequest)
            {
                Log.Information("This service will handle correct codeline requests");
                correctCodelineRequestQueue.Subscribe(adapterConfig.CorrectCodelineQueueName);
            }

            if (adapterConfig.HandleCorrectCodelineResponse)
            {
                Log.Information("This service will handle correct codeline responses");
                correctCodelineExchange.Declare(adapterConfig.CorrectCodelineExchangeName);
                StartCorrectCodelineResponsePollingJob();
            }

            if (adapterConfig.HandleValidateTransactionRequest)
            {
                Log.Information("This service will handle validate transaction requests");
                validateTransactionRequestQueue.Subscribe(adapterConfig.ValidateTransactionQueueName);
            }

            if (adapterConfig.HandleValidateTransactionResponse)
            {
                Log.Information("This service will handle validate transaction responses");
                validateTransactionExchange.Declare(adapterConfig.ValidateTransactionExchangeName);
                StartValidateTransactionResponsePollingJob();
            }

            if (adapterConfig.HandleCorrectTransactionRequest)
            {
                Log.Information("This service will handle correct transaction requests");
                correctTransactionRequestQueue.Subscribe(adapterConfig.CorrectTransactionQueueName);
            }

            if (adapterConfig.HandleCorrectTransactionResponse)
            {
                Log.Information("This service will handle correct transaction responses");
                correctTransactionExchange.Declare(adapterConfig.CorrectTransactionExchangeName);
                StartCorrectTransactionResponsePollingJob();
            }

            if (adapterConfig.HandleCheckThirdPartyRequest)
            {
                Log.Information("This service will handle check third party requests");
                checkThirdPartyRequestQueue.Subscribe(adapterConfig.CheckThirdPartyQueueName);
            }

            if (adapterConfig.HandleCheckThirdPartyResponse)
            {
                Log.Information("This service will handle check third party responses");
                checkThirdPartyExchange.Declare(adapterConfig.CheckThirdPartyExchangeName);
                StartCheckThirdPartyResponsePollingJob();
            }

            if (adapterConfig.HandleGenerateCorrespondingVoucherRequest)
            {
                Log.Information("This service will handle generate corresponding voucher requests");
                generateCorrespondingVoucherRequestQueue.Subscribe(adapterConfig.GenerateCorrespondingVoucherQueueName);
            }

            if (adapterConfig.HandleGenerateCorrespondingVoucherResponse)
            {
                Log.Information("This service will handle generate corresponding voucher responses");
                generateCorrespondingVoucherExchange.Declare(adapterConfig.GenerateCorrespondingVoucherExchangeName);
                StartGenerateCorrespondingVoucherResponsePollingJob();
            }

            if (adapterConfig.HandleGetVoucherInformationRequest)
            {
                Log.Information("This service will handle requests for Voucher Information");
                getVoucherInformationRequestExchange.Declare(adapterConfig.GetPoolVouchersExchangeName);
                StartGetVouchersInformationRequestPollingJob();
            }

            if (adapterConfig.HandleGetVoucherInformationResponse)
            {
                Log.Information("This service will handle response for Voucher Information");
                getVoucherInformationResponseQueue.Subscribe(adapterConfig.GetPoolVouchersQueueName);
            }

            if (adapterConfig.HandleGenerateBulkCreditRequest)
            {
                Log.Information("This service will handle generate bulk credit requests");
                generateBulkCreditRequestQueue.Subscribe(adapterConfig.GenerateBulkCreditQueueName);
            }

            if (adapterConfig.HandleGenerateBulkCreditResponse)
            {
                Log.Information("This service will handle generate bulk credit responses");
                generateBulkCreditResponseExchange.Declare(adapterConfig.GenerateBulkCreditExchangeName);
                StartGenerateBulkCreditResponsePollingJob();
            }

            Log.Information("Dips Adapter Service Started");
        }
예제 #4
0
 private void StartListeningForInputMessages()
 {
     consumer.Subscribe(queueConfiguration.RequestExchangeName + ".queue");
     publisher.Declare(queueConfiguration.ResponseExchangeName);
 }