public TupleConsumerThroughput() { Vane<Message> vane = VaneFactory.New<Message>(x => { x.Consumer(() => new TestConsumer(), xc => { xc.Consume<Subject>(c => c.Consume); }); }); var messageVane = new MessageTypeFeather<Subject>(vane); var fanOutVane = new FanoutFeather<Message>(new[] {messageVane}); _vane = VaneFactory.Success(fanOutVane); }
public void Setup() { var messageConsumerVane = new MessageConsumerFeather<A, WorkingConsumer>(x => x.Consume); Vane<Tuple<Message<A>, WorkingConsumer>> consumerVane = VaneFactory.Success(messageConsumerVane); var messageConsumerVaneB = new MessageConsumerFeather<B, WorkingConsumer>(x => x.Consume); Vane<Tuple<Message<B>, WorkingConsumer>> consumerVaneB = VaneFactory.Success(messageConsumerVaneB); var factoryVane = new FactorySourceVane<WorkingConsumer>(() => new WorkingConsumer()); var loggerVane = new LogFeather<WorkingConsumer>(Console.Out, x => "Logging"); var profilerVane = new ProfilerFeather<WorkingConsumer>(Console.Out, TimeSpan.FromMilliseconds(1)); var sourceVane = VaneFactory.Source(factoryVane, loggerVane, profilerVane); var spliceVane = new SpliceFeather<Message<A>, WorkingConsumer>(consumerVane, sourceVane); var messageVane = new MessageTypeFeather<A>(VaneFactory.Success(spliceVane)); var spliceVaneB = new SpliceFeather<Message<B>, WorkingConsumer>(consumerVaneB, sourceVane); var messageVaneB = new MessageTypeFeather<B>(VaneFactory.Success(spliceVaneB)); var fanOutVane = new FanoutFeather<Message>(new Feather<Message>[] { messageVane, messageVaneB }); _vane = VaneFactory.Success(fanOutVane); }