Sdílet prostřednictvím


MSMQQueueManagement.EodGetReceiveInfo

 

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

(Introduced in MSMQ 3.0.) The EodGetReceiveInfo method of the MSMQQueueManagement object, which represents the state of a destination queue, returns an array of MSMQCollection objects containing exactly-once delivery (EOD) properties for each computer that is sending transactional messages to the destination queue.

Function EodGetReceiveInfo
() As Variant  

Parameters

This method has no parameters.

Return Values

A Variant containing an array of Variants, in which each Variant contains an MSMQCollection object representing a source computer. Each MSMQCollection object in turn contains the following elements (in C++, a VARIANT containing an analogous array of VARIANTs):

  • QueueFormatName (String): The format name used to send the messages to the queue.

  • SenderID (Variant): The GUID of the sending queue manager connected to the queue.

  • SeqID (Variant): The 64-bit sequence identifier of the message stream containing the last message sent to the queue by the sending queue manager.

  • SeqNo (Long): The sequence number of the last message sent to the queue by the sending queue manager.

  • LastAccessTime (Long): The time when the sending queue manager last accessed the queue.

  • RejectCount (Long): The number of times that the message was rejected before it was accepted by the receiving queue manager.

Remarks

The receiving queue manager maintains exactly-once-delivery (EOD) information for each computer sending transactional messages to the destination queue. This information includes the following.

  • The format name used to send the message to the queue.

  • The identifier of the queue manager that sent the message.

  • The sequence identifier and sequence number of the last transactional message sent to the queue.

  • The number of times that the last message was rejected before being accepted.

The following code fragment shows how to obtain transactional information for a local transactional queue.

Dim collarray() As Variant   
Dim lSize As Long  
Dim mgmt As New MSMQManagement  
Dim qmgmt As MSMQQueueManagement  
mgmt.Init Machine:="M1", Pathname:="M1\Q2"  
Set qmgmt = mgmt   ' An error is returned if an outgoing queue was specified.  
collarray() = qmgmt.EodGetReceiveInfo()  
lSize = UBound(collarray)  LBound(collarray) + 1  
If lSize = 0 Then  
MsgBox "An empty array was returned."  
Else  
MsgBox "The identifier of the first computer is: " & collarray(0)("SenderID")  
End If  
Equivalent API Function Call  
When using API functions, the same information can be retrieved using the PROPID_MGMT_QUEUE_EOD_SOURCE_INFO property in a call to MQMgmtGetInfo.  

Requirements

Windows NT/2000/XP: Included in Windows XP and Windows Server 2003.

Windows 95/98/Me: Unsupported.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQQueueManagement
MQMgmtGetInfo
PROPID_MGMT_QUEUE_EOD_SOURCE_INFO