public override void OnCustomerRequestReceived(object sender, NotificationEvent customerRequestEvent)
        {
            var request = customerRequestEvent.DeserializeMessage <CustomerRequest>();

            var message = new Quotation
            {
                VendorAddress = "HSR Layout",
                VendorName    = nameof(NandhiniVendor),
                Amount        = request.MilkQuantity * 44
            };

            _messageBroker.EventBus <Quotation>().Publish(this, new NotificationEvent(new DateTime(), message));
        }
Beispiel #2
0
 static void eventHandler(object sender, NotificationEvent args)
 {
     Console.WriteLine(args.DeserializeMessage <Quotation>().ToString());
 }