MSMQ Overview & Installation

Overview

Microsoft Message Queuing (MSMQ) is a component of the Windows operating system that allows cooperating applications to send and receive messages to each other, even if the intended recipient application is not running or the computer on which the sender or recipient application is running is disconnected from the network. Messages are stored and forwarded by MSMQ until they reach the destination queue. Later, when a recipient application runs, it can retrieve the messages from the queue. MSMQ de-couples sender and recipient applications so they do not need to run at the same time. Message Queuing provides built-in enhanced security, transaction support, and other features.

MSMQ is useful when custom applications need to communicate reliably across potentially unreliable or occasionally connected networks. MSMQ is also useful as a persistent storage mechanism for a list of items. For example, a server-based application could use MSMQ to store queued orders that would be submitted as a batch to an order-processing system at the end of the day. MSMQ is also the underpinning infrastructure for reliable messaging in Windows Communication Foundation, the next version of the client operating system.

Installation

MSMQ is available as a component of Windows is included in future server versions of Windows. Because Message Queuing is a component of Windows, its use is covered by the Windows license. If you have a valid license to use Windows, then you can access MSMQ.

To Install MSMQ on Windows 10

  1. In Windows, open the Control Panel.
  2. Under Programs, select Uninstall a program.
  3. In the left pane,  click Turn Windows features on or off. The Windows Features window appears.
  4. Expand Microsoft Message Queue (MSMQ) Server and then select all available components.
  5. Click OK. This installs all of the necessary MSMQ components.

  6. Click Close to close the Windows Features window. A restart of your computer may be required to complete the installation.

To Install MSMQ on Windows Server 2012/2012 R2, 2016, and 2019

  1. In Windows, open the Control Panel.
  2. Click Programs and Features.
  3. In the left pane, click Turn Windows features on or off. This launches the Server Manager.
  4. In the Add Roles and Features Wizard, click Next.
  5. Select Role-based or feature-based installation, and then click Next.
  6. Select the desired server, and then click Next.
  7. Select the desired server roles, and then click Next.
  8. Under Features, expand Message Queuing, and then expand Message Queuing Services.
  9. Select all available Message Queuing components, and then click Next.
  10. Click Install to install the Message Queuing components.
  11. Click Close to close the wizard. A restart of the destination server may be required to complete the installation.

To Install MSMQ on Windows Server 2008/2008 R2

  1. In Windows, open the Control Panel
  2. Double-click Add or Remove Programs.
  3. Click Add/Remove Windows Components in the left pane.
  4. In the Windows Components wizard, select Application Server, and then click Details.
  5. Check Message Queuing, click OK, and then click Next to complete the installation.
  6. In the Control Panel, double-click Administrative Tools, and then double-click Computer Management.
  7. Expand Services and Applications, and then click Services.
  8. Right-click Message Queuing in the services list, and then click Properties.
  9. Click the Recovery tab, set the first, second, and subsequent failures to Restart the service, and then click OK.
NOTE: Be sure to right-click the Message Queuing service in the services list on the right side of the window. Do not confuse it with the Message Queuing folder in the tree view.