You must restart the Message Queuing service to cleanup message files (199312)



The information in this article applies to:

  • Microsoft Message Queue Server (MSMQ) 1.0
  • Microsoft Message Queuing 2.0
  • Microsoft Message Queuing 3.0

This article was previously published under Q199312

SYMPTOMS

The Microsoft Message Queuing message files accumulate and are only deleted when you startup the Message Queuing service.

Note Microsoft Message Queuing is also known as MSMQ.

CAUSE

The Message Queuing service deletes all empty message files for recoverable and transactional messages upon startup. Recoverable and transactional message storage files are paired and are of the form Lnnnnnnn.MQ and Pnnnnnnnn.MQ or Jnnnnnnn.MQ. For more details on storage directory files, please see the following article in the Microsoft Knowledge Base:

174307 INFO: Interpreting File Names in the Storage Directory

If you do not restart the Message Queuing service, the disk storage usage remains at the peak requirement since the last restart of the Message Queuing service.

RESOLUTION

The following fix installs a periodic cleanup of empty Message Queuing message files. The default interval for cleanup is six hours. This interval can be modified by a new registry key. To change the default interval, you must add MessageCleanupInterval to the registry.

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

  1. Start Registry Editor (REGEDT32.EXE).
  2. Locate and select the following registry subkey:
    HKEY_LOCAL_MACHINE\ Software\Microsoft\MSMQ\Parameters
    					
  3. From the Edit menu, click ADD VALUE.
  4. In the Value Name Field, type MessageCleanupInterval.
  5. In the Data Type Field, select REG_DWORD.
  6. For the data value, enter the desired interval in milliseconds (for example, 3600000 (decimal) for one hour).
  7. Exit Registry Editor to save the changes.
The next time you restart the Message Queuing service, the new interval will be used to cleanup empty message files.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Windows NT 4.0, Service Pack 4.

REFERENCES

MSMQ Administrators Guide; topic: Message Delivery;

Modification Type:MajorLast Reviewed:4/19/2005
Keywords:kbMSMQ100fix kbprb KB199312