Question

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top