public AgencyBanks(IComponentContext container) { this.iContainer = container; queueConfiguration = iContainer.Resolve<IQueueConfiguration>(); publisher = iContainer.Resolve<IExchangePublisher<Job>>(); publisher.Declare(queueConfiguration.ResponseExchangeName); }
static OutboundServiceBus() { Bus = MessageBusFactory.CreateBus(ConfigurationManager.ConnectionStrings["rabbitMQ"].ConnectionString); RequestPublisher = new ExchangePublisher<CreateImageExchangeFileRequest>(Bus); RequestPublisher.Declare("lombard.service.outclearings.createimageexchangefile.request"); ResponseQueue = Bus.QueueDeclare("lombard.service.outclearings.createimageexchangefile.response.queue"); }
static OutboundServiceBus() { Bus = MessageBusFactory.CreateBus(ConfigurationManager.ConnectionStrings["rabbitMQ"].ConnectionString); requestPublisher = new ExchangePublisher<ExecuteBatchReportRequest>(Bus); // TODO: read from config requestPublisher.Declare("lombard.service.reporting.executereport.request"); ResponseQueue = Bus.QueueDeclare("lombard.service.reporting.executereport.response.queue"); }
static OutboundServiceBus() { Bus = MessageBusFactory.CreateBus(ConfigurationManager.ConnectionStrings["rabbitMQ"].ConnectionString); RequestPublisher = new ExchangePublisher<CreateValueInstructionFileRequest>(Bus); // TODO: read from config RequestPublisher.Declare("lombard.service.outclearings.createvalueinstructionfile.request"); RequestQueue = Bus.QueueDeclare("lombard.service.outclearings.createvalueinstructionfile.request.queue"); ResponseQueue = Bus.QueueDeclare("lombard.service.outclearings.createvalueinstructionfile.response.queue"); }
/// <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"); }
public void Start() { webApp = WebApp.Start(adapterConfig.ApiUrl, WebPipelineConfiguration); if (adapterConfig.HandleJobRequests) { Log.Information("This service will handle job requests"); jobExchangePublisher.Declare(adapterConfig.JobsExchangeName); } if (adapterConfig.HandleCopyImageRequests) { Log.Information("This service will handle copy image requests"); copyImagesExchangePublisher.Declare(adapterConfig.CopyImagesExchangeName); } if (adapterConfig.HandleIncidentRequests) { Log.Information("This service will handle incident requests"); incidentExchangePublisher.Declare(adapterConfig.IncidentExchangeName); } Log.Information("MFT Adapter Service Started"); }
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"); }
private void StartListeningForInputMessages() { consumer.Subscribe(queueConfiguration.RequestExchangeName + ".queue"); publisher.Declare(queueConfiguration.ResponseExchangeName); }