Beispiel #1
0
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            base.ConfigureInputQueueEndpoint(configurator);

            _collection = Database.GetCollection <RoutingSlipDocument>(EventCollectionName);

            var persister = new RoutingSlipEventPersister(_collection);

            configurator.UseRetry(Retry.Selected <MongoWriteException>().Interval(10, TimeSpan.FromMilliseconds(20)));

            var partitioner = configurator.CreatePartitioner(16);

            configurator.RoutingSlipEventConsumers(persister, partitioner);
            configurator.RoutingSlipActivityEventConsumers(persister, partitioner);

            _completed        = Handled <RoutingSlipCompleted>(configurator);
            _prepareCompleted = Handled <RoutingSlipActivityCompleted>(configurator, x => x.Message.ActivityName == "Prepare");
            _sendCompleted    = Handled <RoutingSlipActivityCompleted>(configurator, x => x.Message.ActivityName == "Send");
        }
Beispiel #2
0
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            base.ConfigureInputQueueEndpoint(configurator);

            _collection = Database.GetCollection<RoutingSlipDocument>(EventCollectionName);

            var persister = new RoutingSlipEventPersister(_collection);

            configurator.UseRetry(Retry.Selected<MongoWriteException>().Interval(10, TimeSpan.FromMilliseconds(20)));

            var partitioner = configurator.CreatePartitioner(16);

            configurator.RoutingSlipEventConsumers(persister, partitioner);
            configurator.RoutingSlipActivityEventConsumers(persister, partitioner);

            _completed = Handled<RoutingSlipCompleted>(configurator);
            _prepareCompleted = Handled<RoutingSlipActivityCompleted>(configurator, x => x.Message.ActivityName == "Prepare");
            _sendCompleted = Handled<RoutingSlipActivityCompleted>(configurator, x => x.Message.ActivityName == "Send");
        }