public async Task <IActionResult> Schedule()
        {
            var request = new ScheduleNotification
            {
            };

            await _publishEndpoint.ScheduleSend(new Uri("rabbitmq://localhost/schedule_test_queue"), DateTime.Now.AddSeconds(20), request);

            return(Ok(DateTime.Now.ToLongTimeString()));
        }
        public static Task <ScheduledMessage <T> > ScheduleMessage <T>(this ConsumeContext context, Uri destinationAddress, DateTime scheduledTime, T message)
            where T : class
        {
            MessageSchedulerContext schedulerContext;

            if (context.TryGetPayload(out schedulerContext))
            {
                return(schedulerContext.ScheduleSend(destinationAddress, scheduledTime, message));
            }

            IPublishEndpoint endpoint = context;

            return(endpoint.ScheduleSend(destinationAddress, scheduledTime, message));
        }
 public static Task <ScheduledMessage <T> > ScheduleMessage <T>(this IPublishEndpoint publishEndpoint, Uri destinationAddress, DateTime scheduledTime,
                                                                T message, IPipe <SendContext> pipe)
     where T : class
 {
     return(publishEndpoint.ScheduleSend(destinationAddress, scheduledTime, message, pipe));
 }