Example #1
0
 public FileController(
     IExchangePublisher<SendBatchValueInstructionFileResponse> sendVifExchangePublisher, 
     VifDictionary vifDictionary)
 {
     this.sendVifExchangePublisher = sendVifExchangePublisher;
     this.vifDictionary = vifDictionary;
 }
Example #2
0
        public async Task Execute(IExchangePublisher exchangePublisher, byte[] data)
        {
            var strData = System.Text.Encoding.UTF8.GetString(data, 0, data.Length);

            Console.WriteLine($"Consumer '{_prefix}' Message received: {strData}");
            Task.Yield();
        }
Example #3
0
 public AgencyBanks(IComponentContext container)
 {
         this.iContainer = container;
         queueConfiguration = iContainer.Resolve<IQueueConfiguration>();
         publisher = iContainer.Resolve<IExchangePublisher<Job>>();
         publisher.Declare(queueConfiguration.ResponseExchangeName);
 }
Example #4
0
 public FileController(
     IExchangePublisher <SendBatchValueInstructionFileResponse> sendVifExchangePublisher,
     VifDictionary vifDictionary)
 {
     this.sendVifExchangePublisher = sendVifExchangePublisher;
     this.vifDictionary            = vifDictionary;
 }
Example #5
0
 public IncidentsController(
     IExchangePublisher<Incident> incidentExchangePublisher,
     IMapper<CreateIncidentRequest, Incident> incidentRequestMapper)
 {
     this.incidentRequestMapper = incidentRequestMapper;
     this.incidentExchangePublisher = incidentExchangePublisher;
 }
Example #6
0
 public JobsController(
     IExchangePublisher<JobRequest> jobExchangePublisher,
     IMapper<CreateJobFromFileRequest, JobRequest> jobRequestMapper)
 {
     this.jobRequestMapper = jobRequestMapper;
     this.jobExchangePublisher = jobExchangePublisher;
 }
Example #7
0
 public JobsController(
     IExchangePublisher <JobRequest> jobExchangePublisher,
     IMapper <CreateJobFromFileRequest, JobRequest> jobRequestMapper)
 {
     this.jobRequestMapper     = jobRequestMapper;
     this.jobExchangePublisher = jobExchangePublisher;
 }
Example #8
0
 public IncidentsController(
     IExchangePublisher <Incident> incidentExchangePublisher,
     IMapper <CreateIncidentRequest, Incident> incidentRequestMapper)
 {
     this.incidentRequestMapper     = incidentRequestMapper;
     this.incidentExchangePublisher = incidentExchangePublisher;
 }
Example #9
0
        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");
        }
Example #10
0
 public ServiceRunner(
     IQueueConfiguration queueConfiguration,
     IQueueConsumer<ExecuteBatchReportRequest> requestConsumer,
     IExchangePublisher<ExecuteBatchReportResponse> responsePublisher)
 {
     this.queueConfiguration = queueConfiguration;
     this.requestConsumer = requestConsumer;
     this.responsePublisher = responsePublisher;
 }
Example #11
0
 public ServiceRunner(
     IQueueConfiguration queueConfiguration,
     IQueueConsumer <CreateBatchAdjustmentLettersRequest> consumer,
     IExchangePublisher <CreateBatchAdjustmentLettersResponse> publisher)
 {
     this.queueConfiguration = queueConfiguration;
     this.consumer           = consumer;
     this.publisher          = publisher;
 }
Example #12
0
 public ServiceRunner(
     IQueueConfiguration queueConfiguration,
     IQueueConsumer<ProcessValueInstructionFileAcknowledgmentRequest> createVifFileConsumer,
     IExchangePublisher<ProcessValueInstructionFileAcknowledgmentResponse> createVifFilePublisher)
 {
     this.queueConfiguration = queueConfiguration;
     this.createVifFileConsumer = createVifFileConsumer;
     this.createVifFilePublisher = createVifFilePublisher;
 }
Example #13
0
 public ServiceRunner(
     IQueueConfiguration queueConfiguration,
     IQueueConsumer<MatchVoucherRequest> createVifFileConsumer,
     IExchangePublisher<MatchVoucherResponse> createVifFilePublisher)
 {
     this.queueConfiguration = queueConfiguration;
     this.createECLFileConsumer = createVifFileConsumer;
     this.createECLFilePublisher = createVifFilePublisher;    
 }
Example #14
0
 public ServiceRunner(
     IQueueConfiguration queueConfiguration,
     IQueueConsumer<CreateBatchAdjustmentLettersRequest> consumer,
     IExchangePublisher<CreateBatchAdjustmentLettersResponse> publisher)
 {
     this.queueConfiguration = queueConfiguration;
     this.consumer = consumer;
     this.publisher = publisher;
 }
Example #15
0
 internal Publisher(IExchangePublisher publisher, PublishCommandCatalog commandCatalog,
                    PublishEventCatalog eventCatalog, DepsCatalog deps, string sourceService, string sourceHost)
 {
     _publisher      = publisher;
     _eventCatalog   = eventCatalog;
     _commandCatalog = commandCatalog;
     _deps           = deps;
     _sourceHost     = sourceHost;
     _sourceService  = sourceService;
 }
Example #16
0
        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");
        }
Example #17
0
        public async Task Execute(IExchangePublisher exchangePublisher, byte[] data)
        {
            var messageContext = _contextFactory.New <T>(exchangePublisher, data);
            var impl           = _consumerFactory.New();

            _deps.Logger.LogDebug($"Consume command {typeof(T).FullName}. RequestID: {messageContext.RequestId} ConversationID: {messageContext.ConversationId} SourceService: {messageContext.SourceService} PublishTimestamp: {messageContext.PublishTimestamp}");
            await _deps.MiddlewareCommand().Invoke(messageContext, impl.ConsumeCommand);

            _deps.Logger.LogDebug($"Consumed command {typeof(T).FullName} successfully. RequestID: {messageContext.RequestId}");
        }
Example #18
0
 public CheckThirdPartyResponsePollingJob(
     ILifetimeScope component,
     IExchangePublisher <CheckThirdPartyBatchResponse> responseExchange,
     IAdapterConfiguration adapterConfiguration,
     IDipsDbContext dbContext = null)
 {
     this.component            = component;
     this.dbContext            = dbContext;
     this.responseExchange     = responseExchange;
     this.adapterConfiguration = adapterConfiguration;
 }
 public CheckThirdPartyResponsePollingJob(
     ILifetimeScope component,
     IExchangePublisher<CheckThirdPartyBatchResponse> responseExchange,
     IAdapterConfiguration adapterConfiguration,
     IDipsDbContext dbContext = null)
 {
     this.component = component;
     this.dbContext = dbContext;
     this.responseExchange = responseExchange;
     this.adapterConfiguration = adapterConfiguration;
 }
 public CorrectCodelineResponsePollingJob(
     ILifetimeScope component,
     IExchangePublisher<CorrectBatchCodelineResponse> responseExchange,
     IAdapterConfiguration adapterConfiguration,
     IDipsDbContext dbContext = null)
 {
     this.component = component;
     this.dbContext = dbContext;
     this.responseExchange = responseExchange;
     this.adapterConfiguration = adapterConfiguration;
 }
 public ValidateTransactionResponsePollingJob(
     ILifetimeScope component,
     IExchangePublisher <ValidateBatchTransactionResponse> responseExchange,
     IAdapterConfiguration adapterConfiguration,
     IDipsDbContext dbContext = null)
 {
     this.component            = component;
     this.dbContext            = dbContext;
     this.responseExchange     = responseExchange;
     this.adapterConfiguration = adapterConfiguration;
 }
 public GetVouchersInformationRequestPollingJob(
     ILifetimeScope component,
     IExchangePublisher<GetVouchersInformationRequest> requestExchange,
     IAdapterConfiguration adapterConfiguration,
     IDipsDbContext dbContext = null)
 {
     this.component = component;
     this.dbContext = dbContext;
     this.requestExchange = requestExchange;
     this.adapterConfiguration = adapterConfiguration;
 }
Example #23
0
        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");
        }
Example #24
0
 public ServiceRunner(
     IA2IAService carService,
     IAdapterConfiguration adapterConfiguration,
     IQueueConsumer <RecogniseBatchCourtesyAmountRequest> carRequestQueueConsumer,
     IExchangePublisher <RecogniseBatchCourtesyAmountResponse> carResponseExchangePublisher)
 {
     this.adapterConfiguration         = adapterConfiguration;
     this.carRequestQueueConsumer      = carRequestQueueConsumer;
     this.carResponseExchangePublisher = carResponseExchangePublisher;
     this.carService = carService;
 }
 public CorrectCodelineResponsePollingJob(
     ILifetimeScope component,
     IExchangePublisher <CorrectBatchCodelineResponse> responseExchange,
     IAdapterConfiguration adapterConfiguration,
     IDipsDbContext dbContext = null)
 {
     this.component            = component;
     this.dbContext            = dbContext;
     this.responseExchange     = responseExchange;
     this.adapterConfiguration = adapterConfiguration;
 }
Example #26
0
 public ServiceRunner(
     IOutboundConfiguration outboundConfiguration,
     IQueueConfiguration queueConfiguration,
     IQueueConsumer<CreateImageExchangeFileRequest> createBatchImageExchangeFileConsumer,
     IExchangePublisher<CreateImageExchangeFileResponse> createBatchImageExchangeFilePublisher)
 {
     this.outboundConfiguration = outboundConfiguration;
     this.queueConfiguration = queueConfiguration;
     this.createBatchImageExchangeFileConsumer = createBatchImageExchangeFileConsumer;
     this.createBatchImageExchangeFilePublisher = createBatchImageExchangeFilePublisher;
 }
 public CarRequestMessageProcessor(
     IOcrProcessingService carService,
     IMapper <RecogniseBatchCourtesyAmountRequest, OcrBatch> requestMapper,
     IExchangePublisher <RecogniseBatchCourtesyAmountResponse> exchangePublisher,
     IMapper <OcrBatch, RecogniseBatchCourtesyAmountResponse> responseMapper)
 {
     this.carService        = carService;
     this.requestMapper     = requestMapper;
     this.exchangePublisher = exchangePublisher;
     this.responseMapper    = responseMapper;
 }
Example #28
0
 public ServiceRunner(
     IA2IAService carService,
     IAdapterConfiguration adapterConfiguration, 
     IQueueConsumer<RecogniseBatchCourtesyAmountRequest> carRequestQueueConsumer, 
     IExchangePublisher<RecogniseBatchCourtesyAmountResponse> carResponseExchangePublisher)
 {
     this.adapterConfiguration = adapterConfiguration;
     this.carRequestQueueConsumer = carRequestQueueConsumer;
     this.carResponseExchangePublisher = carResponseExchangePublisher;
     this.carService = carService;
 }
 public GenerateCorrespondingVoucherResponsePollingJob(
     ILifetimeScope component,
     IExchangePublisher<GenerateCorrespondingVoucherResponse> responseExchange,
     IAdapterConfiguration adapterConfiguration,
     IDipsDbContext dbContext = null)
 {
     this.component = component;
     this.dbContext = dbContext;
     this.responseExchange = responseExchange;
     this.adapterConfiguration = adapterConfiguration;
 }
 public ValidateTransactionResponsePollingJob(
     ILifetimeScope component,
     IExchangePublisher<ValidateBatchTransactionResponse> responseExchange,
     IAdapterConfiguration adapterConfiguration,
     IDipsDbContext dbContext = null)
 {
     this.component = component;
     this.dbContext = dbContext;
     this.responseExchange = responseExchange;
     this.adapterConfiguration = adapterConfiguration;
 }
Example #31
0
 public GenerateBulkCreditResponsePollingJob(
     ILifetimeScope component,
     IExchangePublisher <GenerateBatchBulkCreditResponse> responseExchange,
     IAdapterConfiguration adapterConfiguration,
     IDipsDbContext dbContext = null)
 {
     this.component            = component;
     this.dbContext            = dbContext;
     this.responseExchange     = responseExchange;
     this.adapterConfiguration = adapterConfiguration;
 }
 public GetVouchersInformationRequestPollingJob(
     ILifetimeScope component,
     IExchangePublisher <GetVouchersInformationRequest> requestExchange,
     IAdapterConfiguration adapterConfiguration,
     IDipsDbContext dbContext = null)
 {
     this.component            = component;
     this.dbContext            = dbContext;
     this.requestExchange      = requestExchange;
     this.adapterConfiguration = adapterConfiguration;
 }
Example #33
0
 public ServiceRunner(
     IAdapterConfiguration adapterConfig,
     HttpConfiguration httpConfig,
     IExchangePublisher<JobRequest> jobExchangePublisher,
     IExchangePublisher<string> copyImagesExchangePublisher,
     IExchangePublisher<Incident> incidentExchangePublisher)
 {
     this.adapterConfig = adapterConfig;
     this.httpConfig = httpConfig;
     this.jobExchangePublisher = jobExchangePublisher;
     this.copyImagesExchangePublisher = copyImagesExchangePublisher;
     this.incidentExchangePublisher = incidentExchangePublisher;
 }
Example #34
0
 public ServiceRunner(
     IAdapterConfiguration adapterConfig,
     HttpConfiguration httpConfig,
     IExchangePublisher <JobRequest> jobExchangePublisher,
     IExchangePublisher <string> copyImagesExchangePublisher,
     IExchangePublisher <Incident> incidentExchangePublisher)
 {
     this.adapterConfig               = adapterConfig;
     this.httpConfig                  = httpConfig;
     this.jobExchangePublisher        = jobExchangePublisher;
     this.copyImagesExchangePublisher = copyImagesExchangePublisher;
     this.incidentExchangePublisher   = incidentExchangePublisher;
 }
Example #35
0
 public CarRequestMessageProcessor(
     // ReSharper disable once InconsistentNaming
     IA2IAService a2iaService,
     IFileSystem fileSystem,
     ICourtesyAmountRequestBatchInfoMapper courtesyAmountRequestBatchInfoMapper,
     IExchangePublisher <RecogniseBatchCourtesyAmountResponse> exchangePublisher,
     IChequeOcrResponseToMessageResponseMapper chequeOcrResponseToMessageResponseMapper)
 {
     this.a2iaService = a2iaService;
     this.fileSystem  = fileSystem;
     this.courtesyAmountRequestBatchInfoMapper = courtesyAmountRequestBatchInfoMapper;
     this.exchangePublisher = exchangePublisher;
     this.chequeOcrResponseToMessageResponseMapper = chequeOcrResponseToMessageResponseMapper;
 }
Example #36
0
        public MessageContext <T> New <T>(IExchangePublisher expPubl, byte[] data)
        {
            var datagram = Deserialize <T>(data);

            return(new MessageContext <T>()
            {
                RequestId = datagram.RequestId,
                Message = datagram.Message,
                SourceHost = datagram.SourceHost,
                SourceService = datagram.SourceService,
                PublishTimestamp = datagram.PublishTimestamp,
                ConversationId = datagram.ConversationId,
                Publisher = _publisherFactory.New(expPubl)
            });
        }
Example #37
0
 public ServiceRunner(
     IAdapterConfiguration adapterConfig,
     IQueueConsumer<ValidateBatchCodelineRequest> validateCodelineRequestQueue,
     IExchangePublisher<ValidateBatchCodelineResponse> validateCodelineExchange,
     IQueueConsumer<CorrectBatchCodelineRequest> correctCodelineRequestQueue,
     IExchangePublisher<CorrectBatchCodelineResponse> correctCodelineExchange,
     IQueueConsumer<ValidateBatchTransactionRequest> validateTransactionRequestQueue,
     IExchangePublisher<ValidateBatchTransactionResponse> validateTransactionExchange,
     IQueueConsumer<CorrectBatchTransactionRequest> correctTransactionRequestQueue,
     IExchangePublisher<CorrectBatchTransactionResponse> correctTransactionExchange,
     IQueueConsumer<CheckThirdPartyBatchRequest> checkThirdPartyRequestQueue,
     IExchangePublisher<CheckThirdPartyBatchResponse> checkThirdPartyExchange,
     IQueueConsumer<GenerateCorrespondingVoucherRequest> generateCorrespondingVoucherRequestQueue,
     IExchangePublisher<GenerateCorrespondingVoucherResponse> generateCorrespondingVoucherExchange,
     IExchangePublisher<GetVouchersInformationRequest> getVoucherInformationRequestExchange,
     IQueueConsumer<GetVouchersInformationResponse> getVoucherInformationResponseQueue,
     IQueueConsumer<GenerateBatchBulkCreditRequest> generateBulkCreditRequestQueue,
     IExchangePublisher<GenerateBatchBulkCreditResponse> generateBulkCreditResponseExchange,
     IJobFactory jobFactory,
     IScheduler scheduler,
     IQuartzConfiguration quartzConfiguration)
 {
     this.adapterConfig = adapterConfig;
     this.validateCodelineRequestQueue = validateCodelineRequestQueue;
     this.validateCodelineExchange = validateCodelineExchange;
     this.correctCodelineRequestQueue = correctCodelineRequestQueue;
     this.correctCodelineExchange = correctCodelineExchange;
     this.validateTransactionRequestQueue = validateTransactionRequestQueue;
     this.validateTransactionExchange = validateTransactionExchange;
     this.correctTransactionRequestQueue = correctTransactionRequestQueue;
     this.correctTransactionExchange = correctTransactionExchange;
     this.checkThirdPartyRequestQueue = checkThirdPartyRequestQueue;
     this.checkThirdPartyExchange = checkThirdPartyExchange;
     this.generateCorrespondingVoucherRequestQueue = generateCorrespondingVoucherRequestQueue;
     this.generateCorrespondingVoucherExchange = generateCorrespondingVoucherExchange;
     this.getVoucherInformationRequestExchange = getVoucherInformationRequestExchange;
     this.getVoucherInformationResponseQueue = getVoucherInformationResponseQueue;
     this.generateBulkCreditRequestQueue = generateBulkCreditRequestQueue;
     this.generateBulkCreditResponseExchange = generateBulkCreditResponseExchange;
     this.jobFactory = jobFactory;
     this.scheduler = scheduler;
     this.quartzConfiguration = quartzConfiguration;
 }
Example #38
0
 public ServiceRunner(
     IAdapterConfiguration adapterConfig,
     IQueueConsumer <ValidateBatchCodelineRequest> validateCodelineRequestQueue,
     IExchangePublisher <ValidateBatchCodelineResponse> validateCodelineExchange,
     IQueueConsumer <CorrectBatchCodelineRequest> correctCodelineRequestQueue,
     IExchangePublisher <CorrectBatchCodelineResponse> correctCodelineExchange,
     IQueueConsumer <ValidateBatchTransactionRequest> validateTransactionRequestQueue,
     IExchangePublisher <ValidateBatchTransactionResponse> validateTransactionExchange,
     IQueueConsumer <CorrectBatchTransactionRequest> correctTransactionRequestQueue,
     IExchangePublisher <CorrectBatchTransactionResponse> correctTransactionExchange,
     IQueueConsumer <CheckThirdPartyBatchRequest> checkThirdPartyRequestQueue,
     IExchangePublisher <CheckThirdPartyBatchResponse> checkThirdPartyExchange,
     IQueueConsumer <GenerateCorrespondingVoucherRequest> generateCorrespondingVoucherRequestQueue,
     IExchangePublisher <GenerateCorrespondingVoucherResponse> generateCorrespondingVoucherExchange,
     IExchangePublisher <GetVouchersInformationRequest> getVoucherInformationRequestExchange,
     IQueueConsumer <GetVouchersInformationResponse> getVoucherInformationResponseQueue,
     IQueueConsumer <GenerateBatchBulkCreditRequest> generateBulkCreditRequestQueue,
     IExchangePublisher <GenerateBatchBulkCreditResponse> generateBulkCreditResponseExchange,
     IJobFactory jobFactory,
     IScheduler scheduler,
     IQuartzConfiguration quartzConfiguration)
 {
     this.adapterConfig = adapterConfig;
     this.validateCodelineRequestQueue             = validateCodelineRequestQueue;
     this.validateCodelineExchange                 = validateCodelineExchange;
     this.correctCodelineRequestQueue              = correctCodelineRequestQueue;
     this.correctCodelineExchange                  = correctCodelineExchange;
     this.validateTransactionRequestQueue          = validateTransactionRequestQueue;
     this.validateTransactionExchange              = validateTransactionExchange;
     this.correctTransactionRequestQueue           = correctTransactionRequestQueue;
     this.correctTransactionExchange               = correctTransactionExchange;
     this.checkThirdPartyRequestQueue              = checkThirdPartyRequestQueue;
     this.checkThirdPartyExchange                  = checkThirdPartyExchange;
     this.generateCorrespondingVoucherRequestQueue = generateCorrespondingVoucherRequestQueue;
     this.generateCorrespondingVoucherExchange     = generateCorrespondingVoucherExchange;
     this.getVoucherInformationRequestExchange     = getVoucherInformationRequestExchange;
     this.getVoucherInformationResponseQueue       = getVoucherInformationResponseQueue;
     this.generateBulkCreditRequestQueue           = generateBulkCreditRequestQueue;
     this.generateBulkCreditResponseExchange       = generateBulkCreditResponseExchange;
     this.jobFactory          = jobFactory;
     this.scheduler           = scheduler;
     this.quartzConfiguration = quartzConfiguration;
 }
 public AdjustmentLettersRequestProcessor(
     ILifetimeScope component,
     IExchangePublisher <CreateBatchAdjustmentLettersResponse> publisher,
     IMessageToBatchConverter requestSplitter,
     ILetterGenerator letterGenerator,
     IFileWriter fileWriter,
     IPathHelper pathHelper,
     IFileReader fileReader,
     IAsposeWrapper asposeWrapper,
     IReferenceDbContext dbContext = null)
 {
     this.component        = component;
     this.publisher        = publisher;
     this.messageConverter = requestSplitter;
     this.letterGenerator  = letterGenerator;
     this.fileWriter       = fileWriter;
     this.pathHelper       = pathHelper;
     this.fileReader       = fileReader;
     this.asposeWrapper    = asposeWrapper;
     this.dbContext        = dbContext;
 }
Example #40
0
 public Publisher New(IExchangePublisher publisher) =>
 new Publisher(publisher, _commandCatalog, _eventCatalog, _deps, _sourceService, _sourceHost);
Example #41
0
 public async Task Execute(IExchangePublisher exchangePublisher, Func <string> messageType, byte[] data, ConsumeMessageMetadata metadata)
 {
     await GetExecutor(messageType(), metadata).Execute(exchangePublisher, data);
 }
Example #42
0
 public CopyImagesController(
     IExchangePublisher <string> copyImageExchangePublisher)
 {
     this.copyImageExchangePublisher = copyImageExchangePublisher;
 }
Example #43
0
 public CopyImagesController(
     IExchangePublisher<string> copyImageExchangePublisher)
 {
     this.copyImageExchangePublisher = copyImageExchangePublisher;
 }