public IEnumerable <Action <IConsumeContext <Distributed <TMessage> > > > GetWorker( IConsumeContext <Distributed <TMessage> > context, MultipleHandlerSelector <Distributed <TMessage> > selector) { _pending.Viewed(context.Message.CorrelationId); return(selector(context) .Select(handler => (Action <IConsumeContext <Distributed <TMessage> > >)(x => Handle(x, handler)))); }
public bool Accept(Distributed <T> message) { if (_inProgress >= _inProgressLimit) { _pendingMessages.Viewed(message.CorrelationId); return(false); } return(true); }