コード例 #1
0
ファイル: ENodeExtensions.cs プロジェクト: zjxbetter/enode
 public static ENodeConfiguration ShutdownEQueue(this ENodeConfiguration enodeConfiguration)
 {
     _commandService.Shutdown();
     _commandConsumer.Shutdown();
     _broker.Shutdown();
     return(enodeConfiguration);
 }
コード例 #2
0
        public static ENodeConfiguration ShutdownEQueue(this ENodeConfiguration enodeConfiguration)
        {
            _commandConsumer.Shutdown();
            _eventPublisher.Shutdown();

            return(enodeConfiguration);
        }
コード例 #3
0
        public async Task Test1()
        {
            //Larva.MessageProcess.LoggerManager.SetLoggerProvider(new Log4NetLoggerProvider());
            var consumer = new CommandConsumer();

            consumer.Initialize(new ConsumerSettings
            {
                AmqpUri = new Uri("amqp://*****:*****@localhost/test")
            }, "MessageProcess_CommandTopic", 4, false, 1, new IInterceptor[] { new PerformanceCounterInterceptor() }, typeof(CommandTests).Assembly);
            consumer.Start();

            var commandBus = new CommandBus();

            commandBus.Initialize(new ProducerSettings
            {
                AmqpUri = new Uri("amqp://*****:*****@localhost/test")
            }, "MessageProcess_CommandTopic", 4, IPEndPoint.Parse("127.0.0.1:5000"));
            commandBus.Start();
            for (var i = 1; i <= 5; i++)
            {
                for (var j = 1; j <= 5; j++)
                {
                    await commandBus.SendAsync(new Command1($"Test{i}"));
                }
            }
            Thread.Sleep(1000);
            commandBus.Shutdown();

            Thread.Sleep(10000);
            consumer.Shutdown();
        }
コード例 #4
0
 public static ENodeConfiguration ShutdownEQueue(this ENodeConfiguration enodeConfiguration)
 {
     _applicationMessagePublisher.Shutdown();
     _domainEventPublisher.Shutdown();
     _commandConsumer.Shutdown();
     _eventConsumer.Shutdown();
     return(enodeConfiguration);
 }
コード例 #5
0
ファイル: ENodeExtensions.cs プロジェクト: wangyuzhu/forum
 public static ENodeConfiguration ShutdownEQueue(this ENodeConfiguration enodeConfiguration)
 {
     _commandService.Shutdown();
     _eventPublisher.Shutdown();
     _commandConsumer.Shutdown();
     _eventConsumer.Shutdown();
     _broker.Shutdown();
     _nameServerController.Shutdown();
     return(enodeConfiguration);
 }
コード例 #6
0
ファイル: ENodeExtensions.cs プロジェクト: bes-slim/enode
 public static ENodeConfiguration ShutdownEQueue(this ENodeConfiguration enodeConfiguration)
 {
     _commandResultProcessor.Shutdown();
     _commandService.Shutdown();
     _eventPublisher.Shutdown();
     _commandConsumer.Shutdown();
     _eventConsumer.Shutdown();
     _broker.Shutdown();
     return(enodeConfiguration);
 }
コード例 #7
0
 public static ENodeConfiguration ShutdownRabbitMQ(this ENodeConfiguration enodeConfiguration)
 {
     _commandService.Shutdown();
     _applicationMessagePublisher.Shutdown();
     _domainEventPublisher.Shutdown();
     _exceptionPublisher.Shutdown();
     _commandConsumer.Shutdown();
     _applicationMessageConsumer.Shutdown();
     _eventConsumer.Shutdown();
     _exceptionConsumer.Shutdown();
     return(enodeConfiguration);
 }
コード例 #8
0
ファイル: ENodeExtensions.cs プロジェクト: zlphoenix/enode
 public static ENodeConfiguration ShutdownEQueue(this ENodeConfiguration enodeConfiguration)
 {
     _commandService.Shutdown();
     _eventPublisher.Shutdown();
     _applicationMessagePublisher.Shutdown();
     _publishableExceptionPublisher.Shutdown();
     _commandConsumer.Shutdown();
     _eventConsumer.Shutdown();
     _applicationMessageConsumer.Shutdown();
     _publishableExceptionConsumer.Shutdown();
     _broker.Shutdown();
     return(enodeConfiguration);
 }
コード例 #9
0
 public static ENodeConfiguration ShutdownEQueue(this ENodeConfiguration enodeConfiguration)
 {
     _commandService.Shutdown();
     _applicationMessagePublisher.Shutdown();
     _domainEventPublisher.Shutdown();
     _exceptionPublisher.Shutdown();
     _commandConsumer.Shutdown();
     _applicationMessageConsumer.Shutdown();
     _eventConsumer.Shutdown();
     _exceptionConsumer.Shutdown();
     _broker.Shutdown();
     _nameServerController.Shutdown();
     return(enodeConfiguration);
 }