Setting storage quotas for multiple instances of MSMQ on a cluster

Microsoft Message Queuing is capable of handling a large volume of messages at any one time but this ability is not limitless. The performance of any machine, no matter the specification, will degrade eventually and to prevent this it is recommended to make use of storage limits (also known as system quotas). Default values are usually 1GB but it is advisable to review your needs and raise (or lower) the value as appropriate.

There are two ways of setting the storage limit, depending on how MSMQ was installed.

  • Active Directory integrated mode - use either the 'Computer Management' or the 'Active Directory: Users and Computers' snapin
  • Worksgroup mode - use RegEdit.exe to edit the registry

Active Directory integrated mode  

Here is an example of setting the storage limit for the clustered MSMQ resource that uses the network name "VirtualMSMQ"; MSMQ was installed in Active Directory integrated mode so changes need to be made to the msmq child object:

  1. Run the 'Active Directory: Users and Computers' snapin
  2. On the View menu, select 'Advanced Features' and 'Users, Groups and Computers as containers'
  3. Drill down to the network name used by the clustered MSMQ resource
  4. Right-click on the msmq folder below it and select Properties
  5. Enter a value (in kilobytes) for the new storage limit
  6. Press OK

 

Workgroup mode

There is no user interface to set the storate limits if MSMQ has been installed in workgroup mode and it is necessary to edit the registry and change MachineQuota.

Here is an example of setting the storage limit for the clustered MSMQ resource called 'MSMQ Service':

  1. Run REGEDIT.EXE
  2. Navigate to HKey_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Clustered QMs\MSMQ$MSMQ Service\Parameters\MachineCache
  3. Double-click the MachineQuota registry value
  4. Change the 'Value data' to the required storage limit
  5. Press OK

Here is an example of setting the storage limit for the local node's MSMQ service: 

  1. Run REGEDIT.EXE
  2. Navigate to HKey_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\MachineCache
  3. Double-click the MachineQuota registry value
  4. Change the 'Value data' to the required storage limit
  5. Press OK

 

Note that the service will need to be restarted for any changes to take effect.

 

References

899612 How to set up computer quotas and queue quotas in Microsoft Message Queuing