添加自定义 MSMQ 属性
我正在设计一个创建、使用和删除 MSMQ 消息队列的应用程序。每个队列都有自定义属性,我当前将其存储在文件中。
然而,我发现这很混乱,如果这个文件消失,整个系统可能会崩溃。
有没有办法可以将自定义属性(例如属性 xml 字符串)绑定到我正在使用的实际消息队列?
干杯, 谢恩
I am designing an application that creates, uses and deletes MSMQ message queues. Each queue has custom properties which I am currently storing in a file.
I find this messy however and the whole system could go down if this file were to dissappear.
Is there a way I can bind custom properties (e.g. a property xml string) to the actual message queues which I am using?
Cheers,
Shane
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
虽然我不知道这是否可能,但你们很多人也不希望您的配置随队列一起下降。我建议使用其他类型的外部存储机制。您可以使用另一个队列来保存每个队列配置的消息(只需确保它是持久的)。您还可以考虑使用数据库来保存您的配置并确保对其进行备份。
While I don't know if that is possible you many not want your configuration to go down with the queue either. I would suggest some other kind of external storage mechanism. You could use another queue that holds messages for each queue configuration(just make sure it's a durable one). You could also look into using a database to hold your configuration and make sure that is backed up.
队列要么在 Active Directory 中定义,要么作为文本文件(在 system32\msmq\storage\LQS 文件夹中)定义,分别用于公共和专用。
理论上,您可以将自定义属性添加到 AD 中的公共队列对象。
同样,您可以将文本添加到专用队列文本文件中(尽管如果队列属性发生更改,它可能会被删除)。
The queues are either defined in Active Directory or as text files (in the system32\msmq\storage\LQS folder), for public and private respectively.
In theory you may be able to add custom properties to the public queue object in AD.
Similarly, you may be able to add text to the private queue text file (although it may get stripped out should the queue properties be changed).