예제 #1
0
파일: MessageChannel.cs 프로젝트: gpauls/MS
        public void Startup()
        {
            var registrar = new Handling.CommandEventRegistrar(_server, _container);

            _commandDiscovery.Register(registrar);
            _eventDiscovery.Register(registrar);
        }
예제 #2
0
        public BusLifetime(IServiceProvider serviceProvider,
                           RabbitMqServer server,
                           ICommandDiscovery commandDiscovery,
                           IEventDiscovery eventDiscovery,
                           ILogger <BusLifetime> logger)
        {
            _serviceProvider = serviceProvider;
            _server          = server;
            _logger          = logger;
            _registrar       = new Registrar(_server, _serviceProvider, _logger);

            commandDiscovery.Register(_registrar);
            eventDiscovery.Register(_registrar);

            _server.DisablePriorityQueues      = true;
            _server.DisablePublishingResponses = true;
            _logger.Debug("Starting RabbitMQ server");
            _server.Start();
        }
예제 #3
0
        public BusLifetime(
            RabbitMqServer server,
            ICommandDiscovery commandDiscovery,
            IEventDiscovery eventDiscovery,
            IEventRegistrar eventRegistrar,
            ICommandRegistrar commandRegistrar,
            ILogger <BusLifetime> logger)
        {
            _server           = server;
            _eventRegistrar   = eventRegistrar;
            _commandRegistrar = commandRegistrar;
            _logger           = logger;

            commandDiscovery.Register(_commandRegistrar);
            eventDiscovery.Register(_eventRegistrar);

            _server.DisablePriorityQueues      = true;
            _server.DisablePublishingResponses = true;
            _logger.Info("Starting RabbitMQ server");
            _server.Start();
        }