示例#1
0
        protected override void Load(ContainerBuilder builder)
        {
            var connectionString = ConfigurationManager.ConnectionStrings["rabbitMQ"].ConnectionString;

            //message bus
            var messageBus = MessageBusFactory.CreateBus(connectionString);

            builder
            .RegisterInstance(messageBus)
            .As <IAdvancedBus>();

            //queue consumers

            builder.RegisterType <CarRequestMessageProcessorFactory>()
            .As <IMessageProcessorFactory <RecogniseBatchCourtesyAmountRequest> >()
            .SingleInstance();

            builder
            .RegisterType <QueueConsumer <RecogniseBatchCourtesyAmountRequest> >()
            .As <IQueueConsumer <RecogniseBatchCourtesyAmountRequest> >()
            .SingleInstance();

            //exchange publishers

            builder.RegisterType <ExchangePublisher <RecogniseBatchCourtesyAmountResponse> >()
            .As <IExchangePublisher <RecogniseCourtesyAmountResponse> >();
        }
示例#2
0
        protected override void Load(ContainerBuilder builder)
        {
            //Message Bus

            var connectionString = ConfigurationManager.ConnectionStrings["rabbitMQ"].ConnectionString;

            var messageBus = MessageBusFactory.CreateBus(connectionString);

            builder
            .RegisterInstance(messageBus)
            .As <IAdvancedBus>()
            .SingleInstance();

            //Queues

            //Exchanges

            builder
            .RegisterType <ExchangePublisher <JobRequest> >()
            .As <IExchangePublisher <JobRequest> >()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <Incident> >()
            .As <IExchangePublisher <Incident> >()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <string> >()
            .As <IExchangePublisher <string> >()
            .SingleInstance();

            //Misc
        }
示例#3
0
        static ValidateCodelineBus()
        {
            Bus = MessageBusFactory.CreateBus(ConfigurationHelper.RabbitMqConnectionString);

            RequestExchange = new ExchangePublisher <ValidateBatchCodelineRequest>(Bus);

            Queue = Bus.QueueDeclare(ConfigurationHelper.ValidateCodelineResponseQueueName);
        }
        static GenerateCorrespondingVoucherBus()
        {
            Bus = MessageBusFactory.CreateBus(ConfigurationHelper.RabbitMqConnectionString);

            RequestExchange = new ExchangePublisher <GenerateCorrespondingVoucherRequest>(Bus);

            Queue = Bus.QueueDeclare(ConfigurationHelper.GenerateCorrespondingVoucherResponseQueueName);
        }
示例#5
0
        static CheckThirdPartyBus()
        {
            Bus = MessageBusFactory.CreateBus(ConfigurationHelper.RabbitMqConnectionString);

            RequestExchange = new ExchangePublisher <CheckThirdPartyBatchRequest>(Bus);

            Queue = Bus.QueueDeclare(ConfigurationHelper.CheckThirdPartyResponseQueueName);
        }
示例#6
0
        static AutoReadCarBus()
        {
            Bus = MessageBusFactory.CreateBus(ConfigurationHelper.RabbitMqConnectionString);

            InboundExchange = new ExchangePublisher <RecogniseBatchCourtesyAmountRequest>(Bus);

            Queue = Bus.QueueDeclare(ConfigurationHelper.OutboundQueueName);
        }
        static GetVouchersInformationBus()
        {
            Bus = MessageBusFactory.CreateBus(ConfigurationHelper.RabbitMqConnectionString);

            ResponseExchange = new ExchangePublisher <GetVouchersInformationResponse>(Bus);

            RequestQueue = Bus.QueueDeclare(ConfigurationHelper.GetPoolVouchersQueueName);
        }
示例#8
0
        static CorrectTransactionBus()
        {
            Bus = MessageBusFactory.CreateBus(ConfigurationHelper.RabbitMqConnectionString);

            RequestExchange = new ExchangePublisher <CorrectBatchTransactionRequest>(Bus);

            Queue = Bus.QueueDeclare(ConfigurationHelper.CorrectTransactionResponseQueueName);
        }
示例#9
0
        static VifBus()
        {
            Bus = MessageBusFactory.CreateBus(ConfigurationHelper.RabbitMqConnectionString);

            RequestExchange = new ExchangePublisher <SendBatchValueInstructionFileRequest>(Bus);

            Queue = Bus.QueueDeclare(ConfigurationHelper.VifResponseQueueName);
        }
        static CreateAdjustmentLettersBus()
        {
            Bus = MessageBusFactory.CreateBus(ConfigurationHelper.RabbitMqConnectionString);

            RequestExchange = new ExchangePublisher <CreateBatchAdjustmentLettersRequest>(Bus);

            Queue = Bus.QueueDeclare(ConfigurationHelper.ResponseQueueName);
        }
示例#11
0
        protected override void Load(ContainerBuilder builder)
        {
            var connectionString = ConfigurationManager.ConnectionStrings["rabbitMQ"].ConnectionString;

            var messageBus = MessageBusFactory.CreateBus(connectionString);

            builder
            .RegisterInstance(messageBus)
            .As <IAdvancedBus>()
            .SingleInstance();

            builder
            .RegisterType <AdjustmentLettersRequestProcessorFactory>()
            .As <IMessageProcessorFactory <CreateBatchAdjustmentLettersRequest> >()
            .SingleInstance();

            builder
            .RegisterType <QueueConsumer <CreateBatchAdjustmentLettersRequest> >()
            .As <IQueueConsumer <CreateBatchAdjustmentLettersRequest> >()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <CreateBatchAdjustmentLettersResponse> >()
            .As <IExchangePublisher <CreateBatchAdjustmentLettersResponse> >()
            .SingleInstance();

            builder
            .RegisterType <CustomErrorHandling>()
            .As <ICustomErrorHandling>()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <Error> >()
            .As <IExchangePublisher <Error> >()
            .SingleInstance();
        }
示例#12
0
文件: JobBus.cs 项目: jhonner72/plat
        static JobBus()
        {
            Bus = MessageBusFactory.CreateBus(ConfigurationHelper.RabbitMqConnectionString);

            Queue = Bus.QueueDeclare(ConfigurationHelper.JobsQueueName);
        }
示例#13
0
        protected override void Load(ContainerBuilder builder)
        {
            var connectionString = ConfigurationManager.ConnectionStrings["rabbitMQ"].ConnectionString;

            //MessageBus

            var messageBus = MessageBusFactory.CreateBus(connectionString);

            builder
            .RegisterInstance(messageBus)
            .As <IAdvancedBus>()
            .SingleInstance();

            //Error Handling

            builder
            .RegisterType <CustomErrorHandling>()
            .As <ICustomErrorHandling>()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <Error> >()
            .As <IExchangePublisher <Error> >()
            .SingleInstance();

            //Mapper

            builder
            .RegisterType <BatchCodelineRequestMapHelper>()
            .As <IBatchCodelineRequestMapHelper>()
            .SingleInstance();

            builder
            .RegisterType <BatchTransactionRequestMapHelper>()
            .As <IBatchTransactionRequestMapHelper>()
            .SingleInstance();

            builder
            .RegisterType <BatchCheckThirdPartyRequestMapHelper>()
            .As <IBatchCheckThirdPartyRequestMapHelper>()
            .SingleInstance();

            builder
            .RegisterType <GenerateCorrespondingVoucherRequestMapHelper>()
            .As <IGenerateCorrespondingVoucherRequestMapHelper>()
            .SingleInstance();

            builder
            .RegisterType <GenerateBulkCreditRequestMapHelper>()
            .As <IGenerateBulkCreditRequestMapHelper>()
            .SingleInstance();

            //Queues

            builder
            .RegisterType <ValidateCodelineRequestProcessorFactory>()
            .As <IMessageProcessorFactory <ValidateBatchCodelineRequest> >()
            .SingleInstance();

            builder
            .RegisterType <QueueConsumer <ValidateBatchCodelineRequest> >()
            .As <IQueueConsumer <ValidateBatchCodelineRequest> >()
            .SingleInstance();

            builder
            .RegisterType <CorrectCodelineRequestProcessorFactory>()
            .As <IMessageProcessorFactory <CorrectBatchCodelineRequest> >()
            .SingleInstance();

            builder
            .RegisterType <QueueConsumer <CorrectBatchCodelineRequest> >()
            .As <IQueueConsumer <CorrectBatchCodelineRequest> >()
            .SingleInstance();

            builder
            .RegisterType <ValidateTransactionRequestProcessorFactory>()
            .As <IMessageProcessorFactory <ValidateBatchTransactionRequest> >()
            .SingleInstance();

            builder
            .RegisterType <QueueConsumer <ValidateBatchTransactionRequest> >()
            .As <IQueueConsumer <ValidateBatchTransactionRequest> >()
            .SingleInstance();

            builder
            .RegisterType <CorrectTransactionRequestProcessorFactory>()
            .As <IMessageProcessorFactory <CorrectBatchTransactionRequest> >()
            .SingleInstance();

            builder
            .RegisterType <QueueConsumer <CorrectBatchTransactionRequest> >()
            .As <IQueueConsumer <CorrectBatchTransactionRequest> >()
            .SingleInstance();

            builder
            .RegisterType <CheckThirdPartyRequestProcessorFactory>()
            .As <IMessageProcessorFactory <CheckThirdPartyBatchRequest> >()
            .SingleInstance();

            builder
            .RegisterType <QueueConsumer <CheckThirdPartyBatchRequest> >()
            .As <IQueueConsumer <CheckThirdPartyBatchRequest> >()
            .SingleInstance();

            builder
            .RegisterType <GenerateCorrespondingVoucherRequestProcessorFactory>()
            .As <IMessageProcessorFactory <GenerateCorrespondingVoucherRequest> >()
            .SingleInstance();

            builder
            .RegisterType <QueueConsumer <GenerateCorrespondingVoucherRequest> >()
            .As <IQueueConsumer <GenerateCorrespondingVoucherRequest> >()
            .SingleInstance();

            builder
            .RegisterType <GetVouchersInformationResponseProcessorFactory>()
            .As <IMessageProcessorFactory <GetVouchersInformationResponse> >()
            .SingleInstance();

            builder
            .RegisterType <QueueConsumer <GetVouchersInformationResponse> >()
            .As <IQueueConsumer <GetVouchersInformationResponse> >()
            .SingleInstance();

            builder
            .RegisterType <QueueConsumer <GenerateBatchBulkCreditRequest> >()
            .As <IQueueConsumer <GenerateBatchBulkCreditRequest> >()
            .SingleInstance();

            builder
            .RegisterType <GenerateBulkCreditRequestProcessorFactory>()
            .As <IMessageProcessorFactory <GenerateBatchBulkCreditRequest> >()
            .SingleInstance();

            //Exchanges

            builder
            .RegisterType <ExchangePublisher <ValidateBatchCodelineResponse> >()
            .As <IExchangePublisher <ValidateBatchCodelineResponse> >()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <CorrectBatchCodelineResponse> >()
            .As <IExchangePublisher <CorrectBatchCodelineResponse> >()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <ValidateBatchTransactionResponse> >()
            .As <IExchangePublisher <ValidateBatchTransactionResponse> >()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <CorrectBatchTransactionResponse> >()
            .As <IExchangePublisher <CorrectBatchTransactionResponse> >()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <CheckThirdPartyBatchResponse> >()
            .As <IExchangePublisher <CheckThirdPartyBatchResponse> >()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <GenerateCorrespondingVoucherResponse> >()
            .As <IExchangePublisher <GenerateCorrespondingVoucherResponse> >()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <GetVouchersInformationRequest> >()
            .As <IExchangePublisher <GetVouchersInformationRequest> >()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <GetVouchersInformationRequest> >()
            .As <IExchangePublisher <GetVouchersInformationRequest> >()
            .SingleInstance();

            builder
            .RegisterType <ExchangePublisher <GenerateBatchBulkCreditResponse> >()
            .As <IExchangePublisher <GenerateBatchBulkCreditResponse> >()
            .SingleInstance();
        }