Masstransit:它可以使用中央msmq服务器吗? (还是我应该从头开始使用w/RabbitMQ?) [英] Masstransit: Can it use central msmq server? (Or should I start w/RabbitMQ from the start?)

查看:90
本文介绍了Masstransit:它可以使用中央msmq服务器吗? (还是我应该从头开始使用w/RabbitMQ?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了Masstransit示例应用程序,一切都很棒. msmq本地操作看起来不错.

现在,我开始将masstransit放入我的真实应用程序中.在我的真实应用程序中,我有来自四个服务器的作业,并且在两个工作器系统上进行处理.

似乎大众运输总想推动:

msmq://localhost/...

但是我以为我会建立一个单一的中央msmq服务器:msmq:///...

在使用msmq时,我似乎需要在多台计算机上设置msmq,并将msmq配置为从一台计算机路由到另一台计算机. >

我想念什么吗?

我是否应该跳过msmq并立即跳到Rabbitmq,(看来可以解决此问题)?

是否有一些基本的msmq知识(也许在masstransit文档中没有)?

谢谢!

解决方案

首先,我总是建议人们使用RabbitMQ而非MSMQ,除非您必须使用 DTC 由于某种原因.即使这样,我还是建议您重新考虑使用DTC.

但是鉴于您有一些限制,您不能战斗.欢迎使用中央MSMQ服务器,但该服务器不提供大量价值.由于其工作方式,每个发送消息的服务器都必须在本地安装MSMQ.实际上,在通过其他有问题的计算机发送消息之前,消息最终会在传出队列中结束.如果您有多计算机MSMQ设置,过去对我来说就像是:

  • Core Machine在/mt_subscriptions上运行MassTransit.RuntimeServices,并且可能在/service_1上运行一项服务
  • 其他处理机在/service_2上运行特定的重载服务,并且其配置参考订阅服务的msmq://coremachine/mt_subscriptions.
  • 还有另一台设置类似的加工机

因此对于这3台计算机,唯一没有msmq://localhost/的东西是对配置中订阅服务的引用.

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!

解决方案

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.

这篇关于Masstransit:它可以使用中央msmq服务器吗? (还是我应该从头开始使用w/RabbitMQ?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆