Opening Queues Offline

Queues can be opened offline using public, private, or direct format names. Once the queue is open, all messages sent to the queue are stored locally by the client computer's Queue Manager, then passed on to the destination queue when the client computer is reconnected to the network.

Caution Messages must be sent in recoverable mode if the offline client computer is to be turned off. Messages sent in express mode are held in RAM and will be lost when the computer is turned off. To send recoverable messages, set the delivery property (PROPID_M_DELIVERY or MSMQMessage.Delivery) of the message to MQMSG_DELIVERY_RECOVERABLE.

Public queues cannot be opened to retrieve or peek at messages while off line.

Public Format Names

To use a public format name, the identifier of the queue must be known by the application before the computer is disconnected from the network.

Here is the syntax of a public format name:

"PUBLIC=QueueGUID"
 

In this format, the client computer accesses MQIS after the computer is reconnected to the network. MQIS resolves the queue identifier, then passes the messages to the appropriate queue.

Private Format Names

To use a private format name, the identifier of the client computer and the queue's name must be known.

Here is the general format of a private format name:

"PRIVATE=MachineGUID\QueueNumber"
 

Direct Format Names

To use a direct format name, the target computer's network address and the queue's name must be known.

Here is the general format of a direct format name (public and private queues can be accessed directly):

DIRECT=AddressSpecification\QueueName            (For public queues.)
DIRECT=AddressSpecification\PRIVATE$\QueueName   (For private queues.)
 

When using a direct format name, the messages are sent directly to the target computer as soon as the client computer is brought back online. (For more information on this format see Direct Format Names.

Opening a Queue

For information on opening a queue, see MQOpenQueue or MSMQQueueInfo.Open


© 1997 by Microsoft Corporation. All rights reserved.