Export (0) Print
Expand All

PROPID_MGMT_QUEUE_JOURNAL_MESSAGE_COUNT

(Read-only, introduced in MSMQ 3.0.) The PROPID_MGMT_QUEUE_JOURNAL_MESSAGE_COUNT property returns the number of messages in the queue journal.

Property ID

PROPID_MGMT_QUEUE_MESSAGE_COUNT

Type Indicator

VT_UI4

MQPROPVARIANT Field

ulVal

Property Value

Number of messages in the queue journal.

Remarks

To retrieve the number of messages in the queue journal, include PROPID_MGMT_QUEUE_JOURNAL_MESSAGE_COUNT in the MQMGMTPROPS structure, call MQMgmtGetInfo, and then examine the value returned.

This property can be retrieved only for an active queue. MQMgmtGetInfo will return a non-specific error (MQ_ERROR) if your application attempts to retrieve the number of messages in the journal of a queue that does not contain messages and is not opened by an application.

Equivalent COM Property

When using COM components, you can retrieve the number of messages in a queue journal using the MSMQQueueManagement.JournalMessageCount property.

Example Code

The following code fragment shows how PROPID_MGMT_QUEUE_JOURNAL_MESSAGE_COUNT T is specified in arrays that can be used to initialize an MQMGMTPROPS structure.

aMgmtPropID[i] = PROPID_MGMT_QUEUE_JOURNAL_MESSAGE_COUNT;    // Property identifier
aMgmtPropVar[i].vt = VT_NULL;                                // Type indicator
i++;

See Also

Show:
© 2015 Microsoft