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

ⅰ亾dé卋堺 提交于 2019-12-11 08:37:43

问题


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!


回答1:


First off I always suggest people use RabbitMQ over MSMQ unless you MUST use DTC for some reason. And even then, I'd suggest you rethink using DTC.

But given you have some constraint you can't fight. You're welcomed to use a central MSMQ server but it doesn't provide a ton of value. Each server sending messages must have MSMQ installed locally because of how it works. Messages actually end up in an outgoing queue before they are sent over the other machine in question. If you have multi-machine MSMQ setups, in the past for me it's been like:

  • Core Machine runs MassTransit.RuntimeServices at /mt_subscriptions, and maybe one service at /service_1
  • Other processing machine runs a specific heavy load service at /service_2 and it's configuration references msmq://coremachine/mt_subscriptions for the subscription service.
  • Yet another processing machine with similar setup

So with those 3 machines, the only thing you don't have msmq://localhost/ is the reference to the subscription service in configuration.



来源:https://stackoverflow.com/questions/23280049/masstransit-can-it-use-central-msmq-server-or-should-i-start-w-rabbitmq-from

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!