private static void Distribute(IEnumerable <Message> messages)
 {
     foreach (var message in messages)
     {
         try
         {
             DataChangedEventNotificationDistributor.Distribute(Deserialize(message));
             DmlMsgLog.Info(Encoding.Unicode.GetString(message.Body));
         }
         catch (Exception e)
         {
             ErrorLog.Error("分发DML消息失败", e);
         }
     }
 }
示例#2
0
 private static void Distribute(IEnumerable <Message> messages)
 {
     foreach (var message in messages)
     {
         try
         {
             var notification = Deserialize(message);
             DataChangedEventNotificationDistributor.Distribute(notification);
             if (DmlMsgLog.IsInfoEnabled)
             {
                 DmlMsgLog.Info(notification.ToLog());
             }
         }
         catch (Exception e)
         {
             if (ErrorLog.IsErrorEnabled)
             {
                 ErrorLog.Error("分发DML消息失败", e);
             }
         }
     }
 }