MSMQ messages disappear from outbound queue but never arrive in the inbound queue

二次信任 提交于 2019-12-09 13:20:49

问题


I have a strange issue setting up an existing application on our new internal Cloud.

I have a simple messaging system that pushes a message from one server (Server1) onto a MSMQ on another server (Server2). The messages disappear off the outbound but never appear in the inbound queue.

When I take Server2 msmq off line the messages build up on Server1. Restarting Msmq on Server2 causes the messages in the outbound queue on Server1 to disappear - but the message still never arrives at Server2.

The details:

  1. MSMQ is set up in Workgroup mode, as that's the virtual networks requirement.
  2. Queues are private.
  3. Permissions are set to allow certain users access.

Has anybody any ideas on why this is happening or how I could track down the issue.


回答1:


I have seen this in the past with the direct format name where it was set to something like

DIRECT=OS:192.16.8.0.1\PRIVATE$\MyQueue

where I should have specified DIRECT=TCP:192.168.0.1\PRIVATE$\MyQueue

see: http://msdn.microsoft.com/en-us/library/windows/desktop/ms700996(v=vs.85).aspx

@John Breakwell had noted here http://blogs.msdn.com/b/johnbreakwell/archive/2010/01/22/why-does-msmq-keep-losing-my-messages.aspx:

Server name used to address message doesn't match destination machine When MSMQ receives a message from over the wire, it always validates that this machine is the correct recipient. This is to ensure that something like a DNS misconfiguration does not result in messages being delivered to the wrong place. The messages are, instead, discarded unless the IgnoreOSNameValidation registry value is set appropriately. You may want to do this with an Internet-facing MSMQ server, for example, where the domain and server names visible to MSMQ clients on the Internet often bear no resemblance to the real ones (for good security reasons).




回答2:


It could be that the remote private queue is a transactional queue and you send the message as non-transactional or vice versa. If the transaction setting on the queue and the message does not match, the message will disappear!




回答3:


It sounds like a permissions or addressing issue.

Try to enable the event log under Applications and Services Logs -> Microsoft -> Windows -> MSMQ called End2End.

This log should tell you exactly what is going wrong with the delivery of messages to the expected destination queue.

Nope: For every successful delivery there should be three events raised in this log:

  1. Message with ID blah came over the network (ie, message has arrived from a remote sender)
  2. Message with ID blah was sent to queue blah (ie, message forwarded to local queue)
  3. Message with ID blah was put into queue blah (ie, message arrives in local queue)

Assumes you are using Server 2008 and above.




回答4:


You can add Negative Source Journaling to the sending application code to find out exactly what the root cause is. Most likely one of the two answers you have already received.




回答5:


Are the messages arriving in the dead-letter queue on Server 2?



来源:https://stackoverflow.com/questions/10598550/msmq-messages-disappear-from-outbound-queue-but-never-arrive-in-the-inbound-queu

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