简体   繁体   English

MSMQ-读取邮件后,是否会从mq文件中删除邮件?

[英]MSMQ - are messages deleted from the mq files once read?

Is it possible to read a queue message from a persistent mq file (eg p000001.mq) that has been processed and deleted, or is the message removed straight away? 是否可以从已处理并删除的持久性mq文件(例如p000001.mq)中读取队列消息,还是可以立即删除该消息?

The mq files haven't shrunk when deleting messages, but I don't appear to be able to open them in QueueExplorer. 删除邮件时,mq文件没有缩小,但是我似乎无法在QueueExplorer中打开它们。

"Is it possible to read a queue message from a persistent mq file that has been processed and deleted." “是否有可能从已处理和删除的永久性mq文件中读取队列消息。”
No. If you open the file in notepad then you should be able to see that the message data is still there but a flag will have been set so that MSMQ knows to make the message invisible. 否。如果在记事本中打开文件,则应该能够看到消息数据仍然存在,但是将设置一个标志,以便MSMQ知道使消息不可见。

MQ files do not shrink immediately as that impacts disk I/O performance. MQ文件不会立即收缩,因为这会影响磁盘I / O性能。 MSMQ performs file cleanup at two points: MSMQ在两点执行文件清除:

  • Service startup 服务启动
  • After the MessageCleanupInterval (default 6 hours). 在MessageCleanupInterval之后(默认为6小时)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM