MessageQueue.PeekByLookupId Method (Int64)
Introduced in MSMQ 3.0. Peeks at the message that matches the given lookup identifier from a non-transactional queue.
Assembly: System.Messaging (in System.Messaging.dll)
Use this method to read a message with a known lookup identifier without removing it from the queue. This method throws an exception immediately if the message is not in the queue.
The LookupId property of a message is unique to the queue where the message resides, so there will be at most one message in the queue that matches the given lookupId parameter.
To read a message with a specified lookup identifier and remove it from the queue, use the M:System.Messaging.MessageQueue.ReceiveByLookupId method.
The following table shows whether this method is available in various Workgroup modes.
Local computer and direct format name
Remote computer and direct format name
Available since 2.0