简体   繁体   中英

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?

The mq files haven't shrunk when deleting messages, but I don't appear to be able to open them in QueueExplorer.

"Is it possible to read a queue message from a persistent mq file that has been processed and deleted."
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.

MQ files do not shrink immediately as that impacts disk I/O performance. MSMQ performs file cleanup at two points:

  • Service startup
  • After the MessageCleanupInterval (default 6 hours).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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