Example #1
0
        public void DeliveryRequest(DeliveryRequest dr)
        {
            Console.WriteLine("DeliveryRequest received...");
            Thread.Sleep(1000);
            var eta = dr.PickupTime.AddMinutes(new Random().Next(10, 20));

            Console.WriteLine("ETA: " + eta.ToString("HH:mm:ss") + " - Sending DeliveryResponse...");
            _publisher.PublishDeliveryResponse(new DeliveryResponse()
            {
                OrderId = dr.OrderId,
                ETA     = eta
            });
        }