コード例 #1
0
        public RabbitMqEventBusShould()
        {
            _subscriber = GetService <TestAllWorksOnRabbitMqEventsPublished>();

            _bus      = GetService <RabbitMqEventBus>();
            _consumer = GetService <RabbitMqDomainEventsConsumer>();
            var config = GetService <RabbitMqConfig>();

            var channel = config.Channel();

            var fakeSubscriber = FakeSubscriber();

            CleanEnvironment(channel, fakeSubscriber);
            channel.ExchangeDeclare(TestDomainEvents, ExchangeType.Topic);
            CreateQueue(channel, fakeSubscriber);

            _consumer.WithSubscribersInformation(fakeSubscriber);
        }
コード例 #2
0
 public ConsumeRabbitMqDomainEventsCommand(RabbitMqDomainEventsConsumer consumer)
 {
     _consumer = consumer;
 }