/// <summary> /// Procesa un mensaje de tipo PricingNotification /// </summary> /// <param name="msg">El mensaje PricingNotification</param> public void ProcessPricingNotification(PricingNotificationType pricingNotification) { ConfigurationManager cmgr = new ConfigurationManager(); DataCenterTypesIDE.PricingRequestType preq = new DataCenterLogic.DataCenterTypesIDE.PricingRequestType(); preq.DDPVersionNum = DDPVersionManager.currentDDP(); preq.MessageId = MessageIdManager.Generate(); preq.MessageType = DataCenterLogic.DataCenterTypesIDE.messageTypeType6.Item14; preq.Originator = cmgr.Configuration.DataCenterID; preq.ReferenceId = pricingNotification.MessageId; preq.schemaVersion = decimal.Parse(cmgr.Configuration.SchemaVersion); preq.test = DataCenterLogic.DataCenterTypesIDE.testType.Item0; preq.TimeStamp = DateTime.UtcNow; //Enqueue DDPrequest Message msgout = new Message(preq); msgout.Label = "priceRequest"; QueueManager.Instance().EnqueueOut(msgout); using (PricingNotificationDataAccess dao = new PricingNotificationDataAccess()) { dao.Create(TypeHelper.Map2DB(pricingNotification), 0); } log.Info("PricingNotification successfully processed"); }
public Response PricingNotification(PricingNotificationType pricingNotification) { log.Info("New PricingNotification message arrived"); validateSchemaVersion(pricingNotification.schemaVersion); //Create message and enqueue it Message msg = new Message(pricingNotification); msg.Label = "pricingNotification"; EnqueueMessageInQueue(msg); //Build response Response response = new Response(); response.response = responseType.Success; log.Info("PricingNotification first validation OK, enqueued"); return(response); }