Search This Blog

Thursday, 9 July 2020

MSMQ: Creating a private Queue on your machine

 A private queue can be created programatically or on your Windows OS.

Here are the steps to follow

1. Enable MSMQ on Your System

  • Go to Control Panel → Programs → Turn Windows features on or off
  • Enable Microsoft Message Queue (MSMQ) Server
  • Verify via Computer Management → Services and Applications → Message Queuing
2. Open Powershell on your machine and add the following command. 

New-MsmqQueue -Name "MyQueue"

3. View your queue at:

%windir%\system32\msmq\storage\lqs

 You must have elevated (Administrator) privileges on your system to access the above queue.

4. To delete a created queue, add the following command in Powershell:

Get-MsmqQueue -Name "MyQueue" -QueueType Private