当 IAmStartedBy 消息出现在 IHandle 消息之后时,NServiceBus Saga 中会发生什么?

发布于 2024-09-03 19:53:31 字数 460 浏览 1 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦里梦着梦中梦 2024-09-10 19:53:31

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文