Beispiel #1
0
        public async Task Execute(IMessagingRoot root, IMessageContext context, DateTime utcNow)
        {
            // Clumsy syntax, but you shouldn't need to do this very often:/
            await context.Envelope.Callback.MoveToScheduledUntil(utcNow.AddHours(1), context.Envelope);

            // Raise a separate "alert" event message
            var session = root.NewContext();
            await session.Send(new RescheduledAlert()
            {
                Id            = context.Envelope.Id,
                ExceptionText = _ex.ToString()
            });
        }
Beispiel #2
0
        public async Task Execute(IMessagingRoot root, IChannelCallback channel, Envelope envelope,
                                  IQueuedOutgoingMessages messages,
                                  DateTime utcNow)
        {
            // Raise a separate "alert" event message
            var session = root.NewContext();
            await session.Schedule(envelope.Message, utcNow.AddHours(1));

            await session.Send(new RescheduledAlert()
            {
                Id            = envelope.Id,
                ExceptionText = _ex.ToString()
            });
        }