示例#1
0
文件: Producer.cs 项目: simoneb/Roger
        public void Start(WaitHandle waitHandle)
        {
            var connectionFactory = new DefaultConnectionFactory(Constants.HostName);

            PublisherConfirmsProvider.DeclareExchange(connectionFactory);

            var bus = new RogerBus(connectionFactory);
            bus.Start();
            StartPublishing(bus, waitHandle);
        }
示例#2
0
文件: Consumer.cs 项目: simoneb/Roger
        public void Start(WaitHandle waitHandle)
        {
            var connectionFactory = new DefaultConnectionFactory(Constants.HostName);

            PublisherConfirmsProvider.DeclareExchange(connectionFactory);
            var bus = new RogerBus(connectionFactory, new SimpleConsumerContainer(new PublisherConfirmsConsumer()));
            bus.Start();

            waitHandle.WaitOne();

            bus.Dispose();
        }