Exemplo n.º 1
0
        public void Startup()
        {
            var registrar = new Handling.CommandEventRegistrar(_server, _container);

            _commandDiscovery.Register(registrar);
            _eventDiscovery.Register(registrar);
        }
Exemplo n.º 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();
        }
Exemplo n.º 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();
        }