接收 MessageQueue 消息而不从接收队列中读取它们?

发布于 2024-07-08 02:03:54 字数 655 浏览 5 评论 0 原文

我正在使用 System.Messaging.MessageQueue 在 LAN 上发送和接收多播 System.Messaging.Messag - 这工作正常。

但是,我需要在不使用消息队列的情况下接收消息。

由于 MessageQueue 使用 PGM 协议(113)发送消息,我正在尝试构建一种使用套接字侦听 PGM(协议 113)的类型(例如 new Socket(AddressFamily.InterNetwork, SocketType.Rdm,(协议类型)113);)。 该类型正在接收消息数据,但它是文本格式(带有soap格式化程序部分 - 请参阅msdn上的示例 http://msdn.microsoft.com/en-us/library/cc219170.aspx)

我显然想要二进制数据,这样我就可以将其转换为 System.Messaging .消息并获取真实数据。

非常感谢任何有关我如何做到这一点的想法。

I am using the System.Messaging.MessageQueue to send and receive multicast System.Messaging.Message’s on my LAN – this works fine.

However, I have a requirement to receive the msgs without using a message queue.

As the MessageQueue uses the PGM protocol (113) to send messages I am trying to build a type that listens on PGM (protocol 113) using a socket (e.g. new Socket(AddressFamily.InterNetwork, SocketType.Rdm, (ProtocolType)113);). The type is receiving message data but it is in a text format (with a soap formatter section -see example this example on msdn http://msdn.microsoft.com/en-us/library/cc219170.aspx)

I obviously want binary data so i can cast it into a System.Messaging.Message and get at the real data.

Any ideas on how i can do this are greatly appreciated .

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

泪意 2024-07-15 02:03:54

如果您纯粹想在 MS Windows 上使用 PGM,那么 Emcaster 是非常好的信息源示例如何使用它。

但是,如果您正在寻找具有更广泛功能的更成熟的解决方案,那么 nServiceBus 框架应该是您的选择选择。

If you are looking purely for PGM use on MS Windows then Emcaster is very good info source with example how to use it.

But if you are looking for more mature solution with broader range of capability then nServiceBus framework should be your choice.

毁梦 2024-07-15 02:03:54

你可以偷看一下吗? MSMQ 支持该功能。 或者您只是想读取您通常不监听的队列上的消息?

You can just peek at them? The MSMQ supports that functionality. Or are you just trying to read messages on queues you don't typically listen on?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文