在工作流到达准备好收听的位置之前,会出现一条消息. [英] A message comes in before a workflow gets to the point where its ready to listen for it.

查看:77
本文介绍了在工作流到达准备好收听的位置之前,会出现一条消息.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个工作流程(WCF WF):

I have a workflow (WCF WF):

等待消息A->进行快速操作(耗时100毫秒)->等待消息B

wait for message A -> do quick operation (takes 100ms) -> wait for message B

在消息A发出10毫秒内,我收到消息A,接着消息B.

I have message A coming in followed by message B within 10 ms from message A.

我的问题是,当worfklow尚未准备就绪时,消息B来得太早了.

My problem is that message B comes too soon, when worfklow is not ready yet for it.

我该如何解决?

推荐答案

WCF消息进入WF被设计为按每个工作流实例排队.

WCF messages coming in to the WF are designed to be queued per workflow instance.

应该拒绝消息B的唯一情况是,消息B实际上确实在A之前到达,还是消息B在A之后到达,但是没有应用相关性将其路由到正确的工作流实例(而是将其路由到正确的工作流实例. 处理它是一个新消息,尚未处理消息A).

The only circumstance which message B should be rejected is if message B actually does arrive before A, or message B arrives after A, but correlation does not get applied to route it to the correct workflow instance (and instead the workflow instance which handles it is a new one, which hasn't handled message A).

如果您想测试哪种情况适用,请尝试通过将接收到的消息放入A的不同分支来接收消息A和B 平行活动.在第一种情况下,您将看到消息停止被拒绝,并且工作流中的变量显示两条消息都到达了相同的工作流实例.在第二种情况下,您还将看到您的消息 停止被拒绝,但工作流程中的变量将显示两条消息都未到达同一工作流程.

蒂姆(Tim)

If you want to test which scenario applies, try receiving Message A and Message B allowing any order by putting your receives in different branches of a Parallel activity. In the first scenario, you would see your message stops getting rejected, and variables in your workflow show that both messages arrived in the same workflow instance. In the second scenario you would also see your message stops getting rejected, but variables in your workflow will show that both messages have not arrived in the same workflow.

Tim


这篇关于在工作流到达准备好收听的位置之前,会出现一条消息.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆