简体   繁体   English

使用MSMQ远程队列

[英]Working with MSMQ Remote Queues

I have running a MSMQ (Message Queuing System) on our web server (Windows 2008), which also has IIS 7. 我已经在具有IIS 7的Web服务器(Windows 2008)上运行了MSMQ(消息队列系统)。

We have a existing public accessible ASMX web service that takes in a Xml request, and writes the relevant data (unencrypted) in a message to the local MSMQ using the following code; 我们有一个现有的公共可访问的ASMX Web服务,该服务接受Xml请求,并使用以下代码将消息中的相关数据(未加密)写到本地MSMQ中。

MessageQueue oMessageQueue = new MessageQueue(@"DIRECT=https://myip/private$/Orders");

try
{
  Order oOrder = new Order();       
  oOrder.Id = 1;    
  oOrder.ProductId = "XYZ-123";
  oOrder.Quantity = 2;
  oOrder.CardNumber = "1111222233334444";
  oOrder.CardExpiry = "2014-12";
  oOrder.CardCv2 = "123";
  oMessageQueue.Send(oOrder);
  return true;
}
catch(Exception ex)
{
   return false;
}

I have a Console app written in C# that needs to read the remote private queue, and process the messages. 我有一个用C#编写的控制台应用程序,需要读取远程专用队列并处理消息。 However I need to enforce the following 但是我需要执行以下操作

(1) All requests to the queue are made over HTTPS (the data contains sensitive card holder data) (1)对队列的所有请求均通过HTTPS进行(数据包含敏感的持卡人数据)

(2) All requests to the queue are authenticated. (2)对队列的所有请求均已认证。

(3) Am I best querying the remote queue, or setting up a site to site connection between two messaging queues, and the local Console App access the local queue. (3)我最好查询远程队列,还是在两个消息传递队列之间建立站点到站点的连接,并且本地Console App访问本地队列。

(4) Since the queue will temporary contain card holder data, should I encrypt the message in the queue (4)由于队列将暂时包含持卡人数据,因此我应该对队列中的消息进行加密

(5) How can I enforce that if the server hosting the MSMQ is restarted that the messages are stored and can still be processed (5)如何强制执行以下操作:如果重新启动承载MSMQ的服务器,则消息将被存储并且仍然可以处理

Can anyone offer some advice on the above ? 任何人都可以针对上述问题提供一些建议吗?

1) If you're using MSMQ 3.0 or later then HTTPS messaging is available 1)如果您使用的是MSMQ 3.0或更高版本,则可以使用HTTPS消息传递

2) There are different approaches/limitations when it comes to authentication, I'd recommend you explore the documentation in-depth to make sure MSMQ can satisfy your needs, you can start here 2)身份验证有不同的方法/限制,建议您深入研究文档,以确保MSMQ可以满足您的需求,您可以从此处开始

3) My personal preference has always been to send to a remote queue and read locally but I think the 'best' approach would depend heavily on you solution architecture 3)我个人的喜好始终是发送到远程队列并在本地读取,但是我认为“最佳”方法在很大程度上取决于您的解决方案体系结构

4) Yes 4)是的

5) Setting the Recoverable property on messages takes care of this, it impacts performance though 5)在邮件上设置“可恢复”属性可解决此问题,尽管这会影响性能

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM