MSMQ信息发送到远程队列 [英] MSMQ Send message to Remote Queue

查看:223
本文介绍了MSMQ信息发送到远程队列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将消息发送到远程队列。我的过程是不是失败了,但我仍然没有看到远程队列的消息?我会假设,如果它无法处理的消息,它会失败?

I am trying to send a message to a remote queue. My process isn't failing, but I still don't see the message on the remote queue? I would assume it would fail if it couldn't process the message?

我也注意到,我的本地计算机上的远程队列中传出队列上市,但不要 ŧ看到有任何的消息。这里很无知和所有例子表明,我过得怎么样(或因此我认为)是正确的。

I did notice that on my local machine the remote queue is listed in Outgoing queues, but don't see messages there either. Very ignorant here and all examples show that how I am doing (or so I assume) is correct.

代码(简单测试):

    using (var transaction = new TransactionScope())
    {
        using (var queue = new MessageQueue(@"FormatName:DIRECT=OS:mymachine\MyQueueQueue"))
        {
            XDocument xdoc = XDocument.Parse("<root/>");

                 var message = new Message(xdoc.ToString());
                queue.Send(message, MessageQueueTransactionType.Single);
        }

        transaction.Complete();
    }

    Console.Read();
}



我做错了吗?奇怪......没有错误,但没有看到任何地方的消息。写的作品我的本地队列中。

What I am doing wrong? Strange...no errors, but don't see message anywhere. Write works to my local queue.

推荐答案

在本地计算机上看到的队列是如何MSMQ从你的机器来发送消息远程计算机。所以不要,只要有就可以了任何消息担心。如果有它的消息将表明远程队列不可用的某些原因。

The queue you see on your local machine is how MSMQ transmits a message from your machine to the remote machine. So don't worry about that as long as there are no messages on it. If there were messages on it that would indicate the remote queue was not available for some reason.

可能的权限可以是一个问题。检查远程队列发送权限。如果呼叫会跨域,您将需要匿名登录添加到您的权限。

Likely permissions could an issue. Check the send permissions on the remote queue. If the call is going cross-domain you will need to add ANONYMOUS LOGON to your permissions.

也可以尝试以启用MSMQ事件日志(如果正在运行Server 2008或以上)。

Also try to enable to MSMQ event log (if you are running server 2008 or above).

更新

看起来要调用公用队列地址。您应该使用专用队列。地址是除了PRIVATE $指令相同的:

It looks like you are calling a public queue address. You should be using private queues. The address is the same except for the PRIVATE$ directive:

FORMATNAME:DIRECT = OS:mymachine\PRIVATE $ \MyQueueQueue

FormatName:DIRECT=OS:mymachine\PRIVATE$\MyQueueQueue

另外:是你的队列名称的 myQueueQueue 的就像在你的队列地址吗?

ALSO: is your queue name myQueueQueue like in your queue address?

这篇关于MSMQ信息发送到远程队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆