MSMQ 和日志记录
我遇到一种情况,我想保留已处理的所有 MSMQ 消息的历史记录或日志(至少在一段时间内)。我意识到我可以使用计算机管理查看当前队列 ->服务和应用 ->消息队列。但我想要的是已处理的消息的历史记录或日志。
到目前为止,我还无法找到一种非编程方式来做到这一点。理想情况下,只需设置 MSMQ 属性即可将所有消息记录到文件甚至 Windows 日志中。
有谁知道这(或类似的事情)是否可能?
I have a situation where I'd like to keep a history or log of all MSMQ messages which have been processed (at least for a period of time). I realize that I can look at the current Queues using Computer Management -> Services and Applications -> Message Queuing. But what I'd like is a history or log of the messages which have already been processed.
I have so far been unable to find a non-programmatic way to do this. Ideally, it's a simple as setting an MSMQ property so that all messages get logged to either a file or even the windows log.
Does anyone know if this (or something similar) is possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过目标日记来做到这一点。这是假设您想将消息存储在接收机器上吗?来自 MSDN:
目标日记是存储传入消息副本的过程。它是基于队列配置的。启用目标日记功能后,当从目标队列中删除(读取)消息时,每条传入消息的副本都会放置在目标日记队列中。创建队列时,会为每个队列创建一个目标日志队列(Journal)。 MSMQ Explorer 在每个公共队列下显示目标日志队列。
You can do this with target journaling. This is assuming you want to store the message on the receiving machine? From MSDN:
Target journaling is the process of storing a copy of incoming messages. It is configured on a queue basis. When target journaling is enabled, a copy of each incoming message is placed in the target-journal queue when the message is removed (read) from the target queue. A target-journal queue (Journal) is created for each queue when the queue is created. MSMQ Explorer displays target-journal queues under each public queue.