var busControl = Bus.Factory.CreateUsingRabbitMq(cfg =>
{
cfg.UseDelayedExchangeMessageScheduler();
public virtual Task Consume(ConsumeContext<ScheduleMessage<T>> context) { var delay = context.Message.ScheduledTime - DateTime.UtcNow; if (delay > TimeSpan.Zero) { return context.Defer(delay); } if (context.ExpirationTime.HasValue && context.ExpirationTime.Value < DateTime.UtcNow) { return Task.CompletedTask; } return context.Send(context.DestinationAddress, context.Message.Payload); }
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/25b2fbf5-10ca-4b6d-bee3-8b5b2cb4cd2c%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/CAHX4WYe9S0L%3DEDr1r1LP7fiC%2Bkn76D4TJCS5aAY8yaWaG0LX4w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/CABvwSNgDG%2B5JTr_ad-XvoJH3mzrb-zonZUn8XQgYzaUQ%2B%2BYzqw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/CAHX4WYfsXfYSPxffE0wn8spxofORN7VoimC28v0fGrSG42DYGQ%40mail.gmail.com.