Opening Queues Offline

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

When reading messages, the queue must be local, and it must be opened using a public format name.

Public Format Names

When opening a queue to send messages, the identifier of the queue must be known by the application before the computer is disconnected from the network. In this case, the client computer accesses Active Directory after the computer is reconnected to the network. Active Directory resolves the queue identifier and then passes the messages to the appropriate queue.

When opening a queue to read messages, the local queue is accessed the same way any other local queue is accessed.

Here is the syntax of a public format name:

"PUBLIC=QueueGUID"
 

Private Format Names

To use a private format name, the identifier of the client computer and the queue's number 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 information on… See…
Public, private, and direct format names Format Name
Opening queues using API calls MQOpenQueue
Opening queues using ActiveX components MSMQQueueInfo.Open