Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

To read messages from a queue journal you must first obtain the format name of the destination queue it is associated with.

The format name of the destination queue is combined with the "JOURNAL" keyword to create the format name of the queue journal.

Here is the syntax of a queue journal for both a public and private destination queue.

Copy Code
PUBLIC=QueueGUID;JOURNAL 
(where PUBLIC=QueueGUID is the format name of a public destination
queue.)
PRIVATE=MachineGUID\QueueNumber;JOURNAL 
(where PRIVATE=MachineGUID\QueueNumber is the format name of a
private destination queue.)
To retrieve a message from a queue journal
  1. Declare the variables needed to retrieve the message.

  2. Obtain the MSMQQueueInfoand call MSMQQueueInfo.Refreshto update the local properties of the MSMQQueueInfoobject.

  3. Construct the format name for the queue journal.

  4. Call MSMQQueueInfo.Opento open the queue journal with receive access.

  5. Call MSMQQueue.Receiveto retrieve the first message in the queue journal.

  6. Call MSMQQueue.Closeto close the queue.

See Also