public static IMessageProcessingPipeBuilder UseFiber(this IMessageProcessingPipeBuilder builder, IFiber fiber, Func <IMessageProcessingLockConfigBuilder, IMessageProcessingLockConfigBuilder> lockConfigurator = null) { IMessageProcessingLockConfig lockConfig = lockConfigurator != null?lockConfigurator(new MessageProcessorLockConfig()).Build() : new MessageProcessorLockConfig(); var mp = new FiberedMessageProcessor(fiber, lockConfig); return(builder.Use(next => context => mp.Process(next, context))); }
public FiberedMessageProcessor(IFiber fiber, IMessageProcessingLockConfig lockConfig = null) { _fiber = fiber; _lockConfig = lockConfig; }