Esempio n. 1
0
        public void SetUp()
        {
            this.context  = new Context();
            this.registry = new HandlerRegistrySimulator(this.context);

            this.broker = new Broker();
            this.sender = new MessageUnit(new EndpointConfiguration().Endpoint("Sender").Concurrency(1))
                          .Use(new AlwaysRouteToDestination(Queue.Create("Receiver")))
                          .Use(this.registry);

            this.broker.Register(this.sender);

            this.broker.Start();
        }
        public void SetUp()
        {
            this.context = new Context();

            this.registry = new HandlerRegistrySimulator(this.context);

            this.sender = new MessageUnit(new EndpointConfiguration().Endpoint(SenderEndpointName).Concurrency(1))
                          .Use(MessagingFactory.Create())
                          .Use(new AlwaysRouteToDestination(Queue.Create(ReceiverEndpointName)))
                          .Use(this.registry);

            this.SetUpNecessaryInfrastructure();

            this.sender.StartAsync().Wait();
        }
Esempio n. 3
0
        public void SetUp()
        {
            this.registry = new HandlerRegistrySimulator();

            this.broker = new Broker();
            this.sender = new MessageUnit(new EndpointConfiguration().Endpoint("Sender").Concurrency(1))
                          .Use(new AlwaysRouteToDestination(Queue.Create("Receiver")));
            this.receiver = new MessageUnit(new EndpointConfiguration().Endpoint("Receiver")
                                            .Concurrency(1).MaximumImmediateRetryCount(MaxImmediateRetryCount).MaximumDelayedRetryCount(MaxDelayedRetryCount)).Use(this.registry);

            this.broker.Register(this.sender)
            .Register(this.receiver);

            this.broker.Start();
        }
        public void SetUp()
        {
            this.context  = new Context();
            this.registry = new HandlerRegistrySimulator(this.context);

            this.broker = new Broker();
            Topic destination = Topic.Create("Subscriber");

            this.publisher = new MessageUnit(new EndpointConfiguration().Endpoint("Publisher").Concurrency(1))
                             .Use(new AlwaysRouteToDestination(destination));
            this.subscriber = new MessageUnit(new EndpointConfiguration().Endpoint("Subscriber")
                                              .Concurrency(1)).Use(this.registry);

            this.broker.Register(this.publisher)
            .Register(this.subscriber, destination);

            this.broker.Start();
        }
Esempio n. 5
0
        public void SetUp()
        {
            context = new Context();

            registry = new HandlerRegistrySimulator(context);

            broker = new Broker();
            sender = new MessageUnit(new EndpointConfiguration().Endpoint(SenderEndpointName).Concurrency(1))
                     .Use(new AlwaysRouteToDestination(Queue.Create(ReceiverEndpointName)))
                     .Use(registry);

            receiver = new MessageUnit(new EndpointConfiguration().Endpoint(ReceiverEndpointName).Concurrency(1))
                       .Use(new AlwaysRouteToDestination(Queue.Create(SenderEndpointName)))
                       .Use(registry);

            broker.Register(sender)
            .Register(receiver);

            broker.Start();
        }
        public void SetUp()
        {
            this.context  = new Context();
            this.registry = new HandlerRegistrySimulator(this.context);
            this.router   = new Router();

            this.broker = new Broker();
            this.sender = new MessageUnit(new EndpointConfiguration().Endpoint("Sender").Concurrency(1))
                          .Use(this.router);
            this.receiverOne = new MessageUnit(new EndpointConfiguration().Endpoint(ReceiverOneEndpointName)
                                               .Concurrency(1)).Use(this.registry);
            this.receiverTwo = new MessageUnit(new EndpointConfiguration().Endpoint(ReceiverTwoEndpointName)
                                               .Concurrency(1)).Use(this.registry);
            this.receiverThree = new MessageUnit(new EndpointConfiguration().Endpoint(ReceiverThreeEndpointName)
                                                 .Concurrency(1)).Use(this.registry);

            this.broker.Register(this.sender)
            .Register(this.receiverOne)
            .Register(this.receiverTwo)
            .Register(this.receiverThree);

            this.broker.Start();
        }