zoukankan      html  css  js  c++  java
  • Enable routing for failed messages in BizTalk 2006

    Enable routing for failed messages in BizTalk 2006

     

     

    BizTalk Server 2006 introduces new functionality called “Enable routing for failed messages”, which enables simplified handling of pipeline errors. Enable routing for failed messages is specified on receive and send ports within the BizTalk Administration Console, as shown in the following figure.

    EnableRoutingForFailedMessages.JPG

    BizTalk Server 2006 中新增了失败消息路由功能。发送/接收端口启用该功能后,会将失败消息重新发布到 MessageBox,消息上下文将额外带有错误报告属性(位于 ErrorReport 命名空间)。

     

    By enabling this feature on a port, a clone of the error message is created, with all the original promoted properties demoted. However, the message has the appropriate error reporting properties promoted, such as the FailureCode, FailureCategory, Description, MessageType, ReceivePortName, InboundTransportLocation, and so on. You can get more information from the Reference 1. Then his message is delivered to the MessageBox, and can be subscribed to by using the filter (ErrorReport.Failurecode exists or ErrorReport.ErrorType=”FailedMessage”). The receive shape of the orchestration is of the System.Xml.XmlDocument type.

     

    You can define a independent BizTalk project and add an orchestration as follows to subscribe that kind of failed message by using the filter. In the meanwhile, you can define a new FaultMessage schema to contain the Error Message from the ErrorReport context properties. The new context properties are as follows:

    Description

    ErrorType

    FailureCategory

    FailureCode

    InboundTransportLocation

    MessageType

    OutboundTransportLocation

    ReceivePortName

    RoutingFailureReportID

    SendPortName

     

    For example, you can use the following code snippet to get the ErrorReport.Description information and write it into the event log.

    System.Diagnostics.EventLog.WriteEntry("Test -- Failed Message",

          msgIn(ErrorReport.Description));



    EnableRoutingForFailedMessages2.JPG

     

     

    References:

    1. Using Failed Message Routing, MSDN

    http://msdn2.microsoft.com/en-US/library/aa578516.aspx

     

     

     

     

  • 相关阅读:
    时光流年(4)向往
    Vue.js入门(9)组件插槽
    时光流年(3)古韵
    Java面试题(12)哈希表
    Java面试题(11)Java中hashCode方法的作用
    Java面试题(10)Java中==、equals()、compareTo()的区别
    Java MyBatis-Plus(1)
    Vue.js入门(8)watch、computed和methods之间的区别
    Java面试题(9)常用工具
    Java MyBatis3(11)逆向工程--MyBatis Generator
  • 原文地址:https://www.cnblogs.com/rickie/p/768387.html
Copyright © 2011-2022 走看看