Masstransit:它可以使用中央MSMQ服务器? (或者我应该开始W从开始/ Rabbit

2019-10-20 00:33发布

I set up the Masstransit sample apps, and all was great. Local operation, msmq, looks good.

Now I am starting to put masstransit in my real app. In my real app, I have jobs coming from four servers, and processing happening on two worker systems.

It seems that masstransit always wants to push to:

msmq://localhost/...

But I thought I would set up a single, central, msmq server: msmq:///...

It appears (I may be missing something! Please correct me if I am off!) that when using msmq, that I need to set up msmq on multiple machines, and configure msmq to route from machine to machine.

Am I missing something?

Should I skip msmq and jump to rabbitmq right off, (which appears to solve for this)?

Is there some fundamental msmq knowledge (that is perhaps not in the masstransit docs) ?

thank you!

Answer 1:

首先,我总是建议人们使用的RabbitMQ在MSMQ除非您必须使用DTC出于某种原因。 即使如此,我建议你重新考虑使用DTC。

但考虑到你有一些限制,你可以不打。 你欢迎使用中央服务器MSMQ,但它并没有提供一吨的价值。 每个服务器发送的邮件必须MSMQ本地安装,因为它是如何工作。 消息实际上是在传出队列结束了他们在问题在其他机器发送之前。 如果您拥有多机MSMQ设置,在过去对我来说一直像:

  • 核心机运行在/ SERVICE_1在MassTransit.RuntimeServices / mt_subscriptions,也许一个服务
  • 其他加工机运行在/ service_2特定的重负载的服务,它的配置参考MSMQ:订阅服务// coremachine / mt_subscriptions。
  • 另一个加工机类似的设置

因此,与那些3台机器,唯一的东西你没有MSMQ://本地主机/是参考配置中的订阅服务。



文章来源: Masstransit: Can it use central msmq server? (Or should I start w/RabbitMQ from the start?)