简体   繁体   English

具有双向接收端口直接绑定的BizTalk中的异常

[英]Exception in BizTalk with Two-Way receive port direct binding

I have the same problem as described here : 我有这里描述的相同问题:

I am using two orchestrations. 我正在使用两个业务流程。 First orchestration calls the second using direct binding through a two-way send port. 第一个业务流程使用双向绑定通过双向发送端口调用第二个业务流程。 Second orchestrion has a two-way receive port to send the result back to the first. 第二个业务流程具有双向接收端口,以将结果发送回第一个。 Every thing is working as it should but I am getting the following exception. 一切正常,但我收到以下异常。

A response message for two-way receive port "Unknown " is being suspended as the messaging engine could not correlate the response to an existing request message. This usually happens when the host process has been recycled.

And the suggested solution works as well ( set the BTS.EpmRRCorrelationToken value to a random value, new GUID in my case, in the first orchestration before send to the direct binding port and then in the secod orchestration i copy the value from the inputMessage to the outputMessage, so the value remains the same. With this method BizTalk knows how to correlate the response back to the caller ). 以及建议的解决方案也可以正常工作( 将BTS.EpmRRCorrelationToken值设置为随机值,对于我来说是新GUID,在发送到直接绑定端口之前的第一个编排中,然后在第二编排中,将输入消息中的值复制到输出消息,因此值保持不变。通过这种方法,BizTalk知道如何将响应关联回调用方 But I can't understand why this works and if this a good way to solve the problem. 但是我不明白为什么这行得通,以及这是否是解决问题的好方法。 The BTS.EpmRRCorrelationToken flow is the following: BTS.EpmRRCorrelationToken流如下: UML

When I don't change the BTS.EpmRRCorrelationToken property, it is the same in all messages which flow in the process, but why on Earth doesn't BizTalk change it instead if it can't correctly correlate the messages? 当我不更改BTS.EpmRRCorrelationToken属性时,在流程中流动的所有消息中它都是相同的,但是为什么在地球上BizTalk不能更改它,如果它不能正确地关联消息呢?

Changing this property is certanly OK in your case. 在您的情况下,更改此属性确实可以。

The problem is direct binding. 问题是直接绑定。 When you use it, you actually going more "low-level" way and have to deal with how BTS publish-subscribe mechanism works. 使用它时,您实际上会采用“低级”方式,并且必须处理BTS的发布-订阅机制如何工作。

Send-Receive port subscribes to receive a message with a specific BTS.EpmRRCorrelationToken. 发送-接收端口订阅以接收带有特定BTS.EpmRRCorrelationToken的消息。 So when you post receive message again in the Message box (for second orch), receive port grabs it too and unsubscribes then. 因此,当您在“消息”框中再次发布接收消息(用于第二个Orch)时,接收端口也会抓住它,然后取消订阅。 When you finally try to send a response - there is noone waiting for it. 当您最终尝试发送响应时-没有人等待它。 So you have to change that property until you sending response back to the port. 因此,您必须更改该属性,直到将响应发送回端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM