2010/07/05

MSMQ 歷險記

 

MSMQ Overview

保哥的心得分享,深入淺出的介紹 MSMQ,並且許多有用的連結,推薦先看這一篇

Message Queuing (MSMQ) 學習心得分享

http://blog.miniasp.com/post/2010/04/MSMQ-Message-Queuing-Learning-Notes.aspx

 

 

錯誤訊息:Access to Message Queuing system is denied

MSMQ 3.0 too secure for you?

http://blogs.msdn.com/b/johnbreakwell/archive/2007/01/15/msmq-3-0-too-secure-for-you.aspx

小熊子測試的結果,上面的選項沒有用,跨 Domain 時,直接設定 Queue 安全性屬性 ANONYMOUS_LOGON=> Full Control

Message Queuing security overview

http://technet.microsoft.com/en-us/library/cc759412%28WS.10%29.aspx

這邊有一個 step by step

http://jwbs-blog.blogspot.com/2009/06/msmq-continued.html

 

錯誤訊息:The Message Queuing service is not available

*檢查防火牆是否有擋下 mqsvc.exe ?

*是否有開啟 MSMQ Service ?

*檢查 MSMQ 路徑格式是否有錯?

PUBLIC=QueueGUID
DIRECT=Protocol:ComputerAddress\QueueName
DIRECT=OS:ComputerName\private$\QueueName
PRIVATE=ComputerGUID\QueueNumber

OR
DIRECT=AddressSpecification\QueueName  (For public queues)
DIRECT=AddressSpecification\PRIVATE$\QueueName  (For private queues)
DIRECT=AddressSpecification\QueueName;JOURNAL  (For public queue journals)
DIRECT=AddressSpecification\PRIVATE$\QueueName;JOURNAL  (For private queue journals)
DIRECT=AddressSpecification\SYSTEM$;computersystemqueue  (Introduced in MSMQ 2.0 for the computer journal and dead-letter queues.)
DIRECT=URLAddressSpecification/QueueName  (Introduced in MSMQ 3.0)
(小熊子常常 OS:<ComputerName> 會寫成 OS:<IP> 當然會出錯!!)

 

 

如何遠端傳送 private Queue ?

這兩篇文章很不錯

MSMQ - Sending messages to remote private queues

http://www.infosysblogs.com/microsoft/2007/02/msmq_sending_message_to_remote.html

MSMQ - Receiving messages from remote private queues

http://www.infosysblogs.com/microsoft/2007/05/msmq_receiving_messages_from_r.html

 

如何取得 Outgoing Queues

為什麼會需要檢查Outgoing Queue? MSMQ 在 Send Remote Queue 時,會先丟到本機的 Outgoing Queues,而且程式上不會出錯,但訊息有可能會卡在這個部份,所以需要程式化來做監控。

 

 

如何取得 Queue 裡的訊息數

 

其他

MessageQueueErrorCode.cs 錯誤代碼對照

http://www.koders.com/csharp/fidE632059BF610D9D912C019A96DCF7A2DD76C847F.aspx

MessageQueueErrorCode Enumeration(MSDN)

http://msdn.microsoft.com/en-us/library/system.messaging.messagequeueerrorcode%28VS.80%29.aspx

沒有留言: