问题
I'm using Rebus (https://github.com/rebus-org (v.0.83)) and until now it's been all local to a single machine. Now I need to use a remote queue from my website to an app server. It's not abundantly clear to me how to set this up with Rebus. A few questions
- I guess I need MSMQ on both machines (web & app) correct? I've configured the web site to
UseMsmqInOneWayClientMode
; - or is there a way to specify to send it over http?
My configuration looks like this more or less. I'm guessing that inputQUeue needs to point to the local machine not the remote one right?
<rebus inputQueue="mywebqueue" errorQueue="MyErrorQueue@mymachine" workers="1" maxRetries="5"> <endpoints> <add messages="MyLibrary.CreateMessage, MyLibrary" endpoint="MyQueue@mymachine"/> </endpoints> </rebus>
Help would really be appreciated.
回答1:
Yes. All machines that need to use MSMQ somehow, need to have MSMQ installed. Even as a one-way client, like your webserver, because MSMQ achieves its high availability by providing outgoing queues when you send to remote machines.
I think so. I've never used MSMQ beyond its basic reliable messaging capabilities. Google around, I bet you can find something ;)
Your configuration looks right. And yes - input queues are always local, whereas queues you send to (error queue and all endpoints specified in the endpoint mappings) can be remote too.
来源:https://stackoverflow.com/questions/34278539/rebus-and-remote-queues