Sdílet prostřednictvím


Storage Folder Files

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

This topic describes the message files found in the MSMQ\Storage folder and the queue registration files found in the …\MSMQ\Storage\Lqs folder. These files cannot be stored on a compressed drive. The information in these files is useful when you need to manually retrieve the queue number of a private queue, inspect the properties of a private queue, or determine the disk space being used to store the messages on a computer.

Files in the MSMQ\Storage Folder

The files in the MSMQ\Storage folder include message files (xxxxxxxxx.mq files), a history file (QMLog file), and state files for received message (MQInSeqs.lgx files) and transaction operations (MQTrans.lgx files).

Message files with an .mq extension represent memory-mapped files where messages are stored. Each file can be up to 4 MB in size. A single file does not represent the messages of a single queue. Each file may contain messages from multiple queues, and conversely, a single queue's messages may be stored in several files. The only restriction to how messages are stored in these files is that a single message cannot span multiple files.

When messages are deleted, only message storage files that have no messages in them are deleted. By default, these files are cleaned up only every six hours. You can modify this time by changing the following registry entry on the local computer.

HKLM\Software\Microsoft\MSMQ\Parameters\MessageCleanupInterval  

These files are not reorganized internally, and messages are not moved from one file to another to release space or empty files when messages are deleted. Empty space in existing storage files is reused for new messages whenever possible.

Each .mq file is prefixed with a letter representing the type of messages it is tracking. These prefixes include:

r000000x.mq

Represents express messages that could not be stored in RAM. (Typically express messages are held in RAM, not on disk.)

p000000x.mq

Represents persistent (recoverable) messages, including transactional messages.

j000000x.mq

Represents queue journal and computer journal messages.

l000000x.mq

Represents an indexing bitmap for interpreting the journal (j000000x.mq) and recoverable (p000000x.mq) message files and for finding areas of appropriate size for storing new messages.

The QMLog file is a history file of all message queue processing. When the log is full, the oldest data is overwritten as new entries are made.

State files are used to temporarily store the information that goes into the QMLog file. The state of receiving ordered messages and all active transactions are periodically saved to the following files.

MQInSeqs.lg1  
MQInSeqs.lg2  
MQTrans.lg1  
MQTrans.lg2  

Information is sent to each set of files (xx.lg1 and xx.lg2) in an alternating pattern to ensure that one file will persist if the other is damage when writing to the QMLog file.

Files in the …\MSMQ\Storage\Lqs Folder

The files in this folder are text files that describe the properties of the local public and private queues. They are formatted as .ini files.

The names of private queue registration files are formatted:

nnnnnnnn.hhhhhhhh  

Where nnnnnnnn is the 8-byte queue number of the private queue, and the hhhhhhhh extension is a hash of the path name of the queue. The queue number is used when manually generating the format name of the private queue.

The names of the local public queue registration files are formatted as follows:

aaaaaaaabbbbccccddddeeeeeeeeeeee.hhhhhhhh  

Here, aaaaaaaabbbbccccddddeeeeeeeeeeee is the queue identifier (queue GUID) of the queue, and the hhhhhhhh extension is a hash of the path name of the queue.