Queue and Computer Administration
Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista
Message Queuing 3.0 introduces API functions, COM objects and methods, and a new set of queue and computer management properties that can be used to administer Message Queuing programmatically.
Note
As of version 3.0, MSMQ no longer needs to be installed on a domain controller (DC), though you may need to install the MSMQ Downlevel Client Service on a DC to support Windows 2000 clients.
The MQMgmtAction function can be used to connect or disconnect a computer from the network and the directory service, clean up empty message storage files, pause and resume the transmission of messages from an outgoing queue, and resend a pending transaction sequence. The equivalent COM methods are:
Read-Only Management Properties
Another new API function for computer and queue management is MQMgmtGetInfo, which retrieves the new read-only management properties of a computer or a queue. This function receives a MQMGMTPROPS structure, which specifies the properties to be retrieved, as an In parameter. The read-only management properties for a computer and their COM equivalents include:
PROPID_MGMT_MSMQ_CONNECTED or MSMQApplication.IsConnected
Indicates whether the queue manager on the computer has been disconnected from the network, and will not attempt to reconnect to the network or to access the directory service.
PROPID_MGMT_MSMQ_DSSERVER or MSMQApplication.DirectoryServiceServer
Returns the name of the current directory service (DS) server for the computer.
PROPID_MGMT_MSMQ_PRIVATEQ or MSMQApplication.PrivateQueues
Returns a list of the path names of all the private queues registered on the computer.
PROPID_MGMT_MSMQ_TYPE or the combination of COM properties consisting of MSMQApplication.MSMQVersionBuild, MSMQApplication.MSMQVersionMajor, and MSMQApplication.MSMQVersionMinor.
Returns version and build information for the computer operating system and Message Queuing installation.
New Read-Only Management Properties
The new read-only management properties returned by MQMgmtGetInfo for a specified queue and the equivalent COM properties, which belong to the new MSMQManagement, MSMQQueueManagement, and MSMQOutgoingQueueManagement objects, include:
PROPID_MGMT_QUEUE_BYTES_IN_JOURNAL or MSMQQueueManagement.BytesInJournal
Returns the number of message bytes in the queue journal.
PROPID_MGMT_QUEUE_BYTES_IN_QUEUE or MSMQManagement.BytesInQueue
Returns the number of message bytes in the queue.
PROPID_MGMT_QUEUE_FOREIGN or MSMQManagement.ForeignStatus
Indicates whether the queue is a foreign queue.
PROPID_MGMT_QUEUE_FORMATNAME or MSMQManagement.FormatName
Returns the format name of the queue.
PROPID_MGMT_QUEUE_JOURNAL_MESSAGE_COUNT or MSMQQueueManagement.JournalMessageCount
Returns the number of messages in the queue journal.
PROPID_MGMT_QUEUE_LOCATION or MSMQManagement.IsLocal
Indicates whether the queue is located on the computer.
PROPID_MGMT_QUEUE_MESSAGE_COUNT or MSMQManagement.MessageCount
Returns the number of messages in the queue.
PROPID_MGMT_QUEUE_NEXTHOPS or MSMQOutgoingQueueManagement.NextHops
Returns the address or a list of possible addresses for routing messages to the destination queue in the next hop.
-
Returns the path name of the queue.
PROPID_MGMT_QUEUE_STATE or MSMQOutgoingQueueManagement.State
Returns the connection state of the outgoing queue.
PROPID_MGMT_QUEUE_TYPE or MSMQManagement.QueueType
Indicates whether the queue is a public, private, system, connector, or multicast outgoing queue.
PROPID_MGMT_QUEUE_XACT or MSMQManagement.TransactionalStatuss
Indicates whether the queue is transactional.