Ejemplo n.º 1
0
        public async Task Post(Guid orderId)
        {
            var msg = new DoY {
                OrderId = orderId
            };

            await _messageSession.Send(msg);
        }
Ejemplo n.º 2
0
        public async Task Handle(DoY message, IMessageHandlerContext context)
        {
            log.Info($"Received order {message.OrderId}");

            Data.TimeoutExpectedAt = DateTime.UtcNow + TimeSpan.FromSeconds(ProcessingTime);

            var newMessage = new ExecuteYRequest {
                OrderId = message.OrderId
            };

            // Send continuation to ApplicationA
            await context.Send(newMessage);

            // Request timeout to fake that this process is done in a while
            await RequestTimeout <YTimeout>(context, TimeSpan.FromSeconds(ProcessingTime));
        }