第一条消息未通过 MSMQ/MassTransit 服务总线到达

发布于 2025-01-06 20:17:26 字数 110 浏览 1 评论 0原文

我有一个通过 MSMQ 运行的 MassTransit ServiceBus。看来通过总线发送的第一条消息没有到达,但后续消息却到达了?

在发送消息之前是否需要在队列或总线上执行一些初始化?

I've got a MassTransit ServiceBus running over MSMQ. It appears that the first message sent over the Bus doesn't arrive, but subsequent messages do?

Is there some initialization that needs performing on the queue or bus before the message is sent?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

衣神在巴黎 2025-01-13 20:17:26

这取决于一些设置,即系统需要设置多少时间才能正确路由。如果只有第一条消息未能到达正确的位置,则订阅数据可能尚未传播到所有地方。 http://readthedocs.org/docs/masstransit/en/develop/overview /subscriptions.html

使用多播订阅是最简单的选择,在端点启动并向所有其他端点注册订阅者后需要几秒钟。如果您可以控制服务的启动顺序,那么通常可以通过在流程中从后到前启动来避免这种情况。

如果您使用订阅服务,那么也可能需要几秒钟的时间才能到处获取数据。它必须通过订阅服务,但订阅会发送给公交车上的每个人。这与 SQL 数据库相关,数据库的延迟可能会影响此计时。

最后,如果您使用静态路由,那么这应该立即起作用,因为订阅是在启动时设置的。

This depends on a few settings in how much time the system needs to setup before everything will correctly route. If only first message is failing to end up in the right location, then likely the subscription data isn't propagated everywhere yet. http://readthedocs.org/docs/masstransit/en/develop/overview/subscriptions.html

Using Multicast subscriptions, the easiest choice, will require a few seconds after a endpoint has come up and register a subscriber with all other endpoints. If you can control the order of services starting up, then this can often be avoided by started back to front in the flow.

If you are using the subscription service, then that can also take a couple seconds to get data everywhere. It has to go through the subscription service but the subscription is send to everyone on the bus. This is tied to a SQL db, and latency to the db can effect this timing.

Lastly, if you are using static routing, then that should work immediately, because the subscription is setup upon startup.

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