相应 WCF 绑定使用的实际 MSMQ 地址是什么?
此问题与这个相关。
鉴于 WCF 绑定使用 net.msmq://
URL,例如 net.msmq://server/private/nc_queue
,如何知道实际的 MSMQ 是什么该 URL 被转换为哪个地址?是否有某种可以激活的痕迹?或者有一种外部工具可以帮助人们捕获地址?
谢谢。
EDIT1
好的,我需要澄清一下。人们可以通过相应的 .NET API 直接与 MSMQ 对话。对于通过其本机端口 1801 的 MSMQ,我将使用此 MSMQ 地址:
FormatName:Direct=OS:server\private$\nc_queue
当通过 HTTP 配置 MSMQ 时,地址将更改为如下所示:
FormatName:Direct=http://server/msmq/nc_queue
但 WCF 绑定使用标准 URL 来描述地址,例如:
net.msmq://server/private/nc_queue
所以,我如何知道 net.msmq://
转换到的实际 MSMQ 地址(带有 FormatName 的地址)是什么?
This question is related to this one.
Given that WCF binding uses net.msmq://
URL, for instance net.msmq://server/private/nc_queue
, how can one know what is the actual MSMQ address to which this URL is translated? Is there some kind of a trace that can be activated? Or an external tool that would help one capture the address?
Thanks.
EDIT1
OK, I owe a clarification. One can talk directly to MSMQ through the respective .NET API. In the case of MSMQ over its native port 1801, I would use this MSMQ address:
FormatName:Direct=OS:server\private$\nc_queue
When MSMQ is configured over HTTP, the address changes to something like this:
FormatName:Direct=http://server/msmq/nc_queue
But the WCF binding uses a standard URL to describe the address, like:
net.msmq://server/private/nc_queue
So, how can I know what is the actual MSMQ address (the one with the FormatName) to which the net.msmq://
is translated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不太明白你的问题......如果你使用 WCF
netMsmqBinding
,你基本上是将 MSMQ 消息放入 MSMQ 队列中。因此,您真正拥有的是您正在处理的队列名称,而不是 URL...这会转换为
上名为
- 那么你到底想做什么?我不明白......愿意澄清吗?nc_queue
的 MSMQ 私有队列>server同时,请查看 Tom Hollander 关于 MSMQ、WCF 和 IIS 的三部分博客文章系列:
更新:我想我开始理解您的问题 - 如果您使用 WCF
netMsmqBinding
,您将直接连接到 MSMQ - 这不是“MSMQ-over-HTTP”。如果您想从 WCF 客户端设置和使用 MSMQ-over-HTTP,据我了解,您将与直接的常规 HTTP 服务通信,因此您必须使用 basicHttpBinding (或wsHttpBinding
)-不是特定的netMsmqBinding
。I don't really understand your question.... if you use the WCF
netMsmqBinding
, you're basically dropping off MSMQ messages into an MSMQ queue. So what you really have is a queue name that you're dealing with - not a URL.....This translates into a MSMQ private queue called
nc_queue
onserver
- so what is it really that you're trying to do?? I'm not getting it..... care to clarify??In the meantime, check out Tom Hollander's three-part blog post series on MSMQ, WCF and IIS:
Update: I think I'm beginning to understand your issues - if you're using the WCF
netMsmqBinding
, you're connecting to MSMQ directly - this is not "MSMQ-over-HTTP". If you want to set up and use MSMQ-over-HTTP from a WCF client, from what I understand, you'd be talking to a straight regular HTTP service, so you'd have to usebasicHttpBinding
(orwsHttpBinding
) - not the specificnetMsmqBinding
.