当 IAmStartedBy 消息出现在 IHandle 消息之后时,NServiceBus Saga 中会发生什么?
我有一个 NServiceBus Saga ,看起来像这样,
public class MySaga : Saga<MySagaData>,
IAmStartedByMessages<MyStartMessage>,
IHandleMessages<OtherMessage>
但消息可能会乱序。那么,当 IAmStartedBy 消息出现在 IHandle 消息之后时,会发生什么情况呢? OtherMessage 不会有 SagaData。 NServiceBus 会吞掉该消息还是稍后尝试重新处理它?
I have an NServiceBus Saga that looks like this
public class MySaga : Saga<MySagaData>,
IAmStartedByMessages<MyStartMessage>,
IHandleMessages<OtherMessage>
But messages can come out of order. So what happens when the IAmStartedBy Message comes after the IHandle Message? There will be no SagaData for OtherMessage. Will NServiceBus swallow the message or try to re-handle it later?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
NServiceBus 将无法找到 OtherMessage 的活动 saga,重试配置的次数,然后将该消息放入错误队列中。重试可能会延迟足够长的时间以使 MyStartMessage 到达。为什么 OtherMessage 也无法启动传奇?
(您可以有多条消息来启动传奇)
NServiceBus will fail to find an active saga for OtherMessage, retry the configured number of times and then put the message in the error queue. The retries might delay long enough for MyStartMessage to arrive. Any reason why OtherMessage can't start the saga as well?
(you can have multiple messages that can start a saga)