Message Queuing (MSMQ)

MSMQ (Microsoft Message Queuing) is a messaging protocol that enables applications running on independent, physical servers to communicate in a failsafe manner. The method used to enable MSMQ for a K2 installation is dependent on how AD (Active Directory) has been configured for the domain. MSMQ Directory Service Integration is required for K2 blackpearl installations.

If you upgraded from K2 blackpearl 4.7 to K2 Five or are installing K2 Five and encounter an error like "System.InvalidOperationException: Message Queuing has not been installed on this computer" please see the article KB003218 Known Issue: MSMQ errors in the K2 Five (5.x) Server Log.

Note for Windows Server 2012: When setting the permissions as mentioned in step 6 below (for Windows Server 2008), the permissions should be granted to the Root Object and not the Computer Object as in Windows Server 2008.

To install MSMQ in Windows Server 2012, follow the steps below:

  1. Open the Programs and Features window (Start > Control Panel > Programs and Features).
  2. Click on the Turn Windows features on or off link.
  3. Select the Destination Server from the Server Selection link, then click on the Add Features link.
  4. Expand the Message Queuing node.
  5. Select Message Queuing Services and sub-nodes Message Queuing Server and Directory Services Integration.
  6. Choose the appropriate permissions settings response (please read the Install Message Queuing topic in the following TechNet article and take note of the two different methods for configuring permissions depending on whether the Windows Server computer is a domain controller or not).
  7. Click Next, then click Install.
  8. Once the installation has completed, click on Close and reboot the server.

Creating private queues when installing K2 on a non-domain server or Workgroup machine

When installing K2 on a non-domain server, you will need to create private MSMQ queues on each server where the K2 blackpearl Service is installed. This can be completed under Computer management on the machine where K2 is installed.

  1. Create new Private Queues
  2. Create two Transactional queues: Eventbus and Eventbus error

  3. After both Queues are added, change the msmqpath and msmqerrorpath values in the file K2HostServer.exe.config, located in the Host Server\Bin directory on the servers where the K2 blackpearl Service is installed. You must specify the values of the private queue paths in the following format: "ComputerName\private$\QueueName". For example:
    msmqpath="WIN2012\EventBus" msmqerrorpath="WIN2012\EventBus Error" should be changed to
    msmqpath="WIN2012\private$\Eventbus" msmqerrorpath="WIN2012\private$\Eventbus Error"

Post Installation Checks

Perform the following post installation steps to verify that MSMQ is configured correctly:

  1. Verify that the Workgroup registry key located under HKLM\Software\Microsoft\MSMQ\Parameters\ is set to 0.
  2. Restart MSMQ.
  3. Verify that MSMQ is running in Domain mode after this procedure.
  4. In Computer Management confirm that Message Queuing has a node called Public Queues and that the K2Server Service account (or the local admin account in Azure) has rights to this folder by right-clicking both the created private queues and selecting Properties, then checking the user names in the Security tab.

For further information regarding MSMQ and Windows Server integration see the TechNet article Enable Microsoft Message Queuing (MSMQ)