How to setup MSMQ server so that it can be accessed over the Internet

▼魔方 西西 提交于 2019-12-19 10:29:38

问题


We have MSMQ on a Windows 2008 R2 server, with the followings Firewall settings: 1) Message Queuing is checked in 'Allow programs to communicate through Windows Firewall' 2) Enable TCP port: 2103, 2105, 1801

But when a c# application (using FormatName:DIRECT=TCP:xxx.xxx.xxx.xxx\Private$\q1) attempts to receive the private queue message, it encountered the following error:

System.Messaging.MessageQueueException: Remote computer is not available. at System.Messaging.MessageQueue.MQCacheableInfo.get_ReadHandle()

Is something amiss from the above setup? Please help.........

Thanks, Ben


回答1:


Firstly, your queue address is not correct for an internet enabled msmq queue. It should be of the format

FormatName:DIRECT=http://myQueueServerURL/Private$\q1

You also need to properly configure msmq on the server to allow incoming calls to port 80 (or 443 for https).

Alternatively, you could look at the NServiceBus Gateway, which sits on msmq but takes care of http communication across the internet to another Gateway.

You could also consider using internet-based queuing, for example, Azure service bus.

RE: comment on Receiving from a remote queue across the internet

What you want to do is straight-up impossible with MSMQ.

You can however host the queue locally and then have senders send to you over the internet.



来源:https://stackoverflow.com/questions/19156136/how-to-setup-msmq-server-so-that-it-can-be-accessed-over-the-internet

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