MSMQ Overview and 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 where 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 decouples 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 can use MSMQ to store queued orders that is 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/11
- In Windows, open Control Panel.
- Under Programs, select Uninstall a program.
- From the left pane, select Turn Windows features on or off.
- On the Windows Features page, expand Microsoft Message Queue (MSMQ) Server and select all available components.
-
Click OK to install all necessary MSMQ components.
-
You might need to restart your computer to complete the installation.
To install MSMQ on Windows Server 2012/2012 R2, 2016, 2019, and 2022
- In Windows Server, open Control Panel.
- Click Programs and Features.
- From the left pane, select Turn Windows features on or off. This launches the Server Manager.
- In the Add Roles and Features wizard, click Next.
- Click Role-based or feature-based installation and click Next.
- Select the desired server and click Next.
- Select the desired server roles and click Next.
- Under Features, expand Message Queuing and expand Message Queuing Services.
- Select all available Message Queuing components and click Next.
- Click Install to install the Message Queuing components.
- You might need to restart the destination server to complete the installation.
To install MSMQ on Windows Server 2008 R2 SP1
- In Windows Server, open Control Panel
- Double-click Add or Remove Programs.
- From the left pane, select Add/Remove Windows Components.
- In the Windows Components wizard, select Application Server and click Details.
- Click Message Queuing and click OK.
- Click Next to complete the installation.
- In the Control Panel, double-click Administrative Tools and double-click Computer Management.
- Expand Services and Applications and click Services.
- In the services list on the right side (not in the folder in the tree view), right-click Message Queuing and select Properties.
- From the Recovery tab, set the first, second, and subsequent failures to Restart the service and click OK.