昨天下午部署同步服务时,碰到关于消息队列的几个问题,记录一下:
1、刚开始System.Messaging.MessageQueue.Exists()
提示无法找到特定的队列名称什么的,看着MSDN把几种名称格式都试了一遍,都不行。
2、后面手工添加某个名称到专用队列,不用Exists(),这回可以new MessageQueue(path),但是到Receive()时,提示“队列路径名无效”和“格式名无效”,上网查得死去活来,都是说路径的问题,路径我都试了一遍,还是这两个问题,最后查到stackoverflow --> “Machine_Name\private$\msmq_name fails because the queue was created on the local machine and not the virtual machine”
我在物理机器上一均正常,到了virtual machine,Mlgb
先记录一下,至于是否virtual machine的问题,待验证。