Task IFilter <ConsumeContext> .Send(ConsumeContext context, IPipe <ConsumeContext> next)
        {
            MessageSchedulerContext schedulerContext = new ConsumeMessageSchedulerContext(context, _schedulerAddress);

            context.GetOrAddPayload(() => schedulerContext);

            return(next.Send(context));
        }
        Task IFilter <ConsumeContext> .Send(ConsumeContext context, IPipe <ConsumeContext> next)
        {
            var scheduler = new PublishMessageScheduler(context);

            MessageSchedulerContext schedulerContext = new ConsumeMessageSchedulerContext(context, scheduler);

            context.GetOrAddPayload(() => schedulerContext);

            return(next.Send(context));
        }
Exemplo n.º 3
0
        Task IFilter <ConsumeContext> .Send(ConsumeContext context, IPipe <ConsumeContext> next)
        {
            var scheduler = new EndpointMessageScheduler(context, _schedulerAddress);

            MessageSchedulerContext schedulerContext = new ConsumeMessageSchedulerContext(scheduler, context.ReceiveContext.InputAddress);

            context.GetOrAddPayload(() => schedulerContext);

            return(next.Send(context));
        }
        Task IFilter <ConsumeContext> .Send(ConsumeContext context, IPipe <ConsumeContext> next)
        {
            var modelContext = context.ReceiveContext.GetPayload <ModelContext>();

            var scheduler = new DelayedExchangeMessageScheduler(context, modelContext.ConnectionContext.HostSettings);

            MessageSchedulerContext schedulerContext = new ConsumeMessageSchedulerContext(context, scheduler);

            context.GetOrAddPayload(() => schedulerContext);

            return(next.Send(context));
        }