Multiple-Element Format Names

Updated: June 25, 2007

Applies To: Windows Server 2008

Message Queuing allows a sending application to send a single message to a list of destination queues. That list can be constructed dynamically in the form of a multiple-element format name or can be published and kept in Active Directory Domain Services in the form of a distribution list. For more information about distribution lists, see Distribution Lists.

A multiple-element format name can be constructed to do the following:

  • Send transactional and nontransactional messages to multiple destinations.

  • Specify multiple administration queues for sending acknowledgment messages.

  • Specify multiple response queues for sending response messages.

A multiple-element format name is formed as a concatenation of one or more public, private, direct, or distribution list format names separated by commas (for more information about format names, see Format names in Queue Names). Thus, different kinds of format names used in Message Queuing can be used together as elements of a multiple-element format name. The following example shows a multiple-element format name that contains a direct format name, a public format name, and a distribution list format name.

DIRECT=ComputerAddress\QueueName,PUBLIC=QueueGUID,DL=DL_GUID

Multiple-element format names can also be used to send messages to multiple destinations in workgroup or offline mode provided they do not contain an element that points to a public queue or a distribution list. For example, if a multiple-element format name references a private queue and a distribution list, no message will be sent to either target when there is no access to Active Directory Domain Services.

Multiple-element format names can be used to reference multiple administration and response queues. However, they cannot contain format names of read-only queues, such as queue journals, computer journals, or dead-letter queues. An error is returned if a format name of a read-only queue is included in a multiple-element format name.

To enable downlevel compatibility, a list of explicit destinations is derived from every distribution list or multiple-element format name used to send a message in the source computer, and this information is included along with the distribution list or multiple-element format name in each message packet that is sent. For example, when a message is sent to distribution list D1 that references three queues (Q1, Q2, and Q3), the message packet sent to the three computers contains the explicit destinations Q1, Q2, and Q3 as well as the original distribution list D1. If any of the destination computers is running Message Queuing 2.0 or earlier, it will use the explicit destinations Q1, Q2, or Q3. Any computer that is running Message Queuing 4.0 will use D1 and disregard the repeated destinations.

When a transactional message is sent to a multiple-element format name, appropriate guaranteed positive or negative acknowledgment messages can be returned to the sending application. In addition, Message Queuing guarantees that messages sent in consecutive transactions initiated from the same computer to the same destination queue will arrive exactly once and in the order in which the transactions were committed regardless of the way in which the target queue was addressed: either as an element of a multiple-element format name or as an individual queue.

When a transactional message is sent to a multiple-element format name, Message Queuing logically constructs a single transaction that consists of a series of discrete operations for sending the message to each of the target queues contained in the multiple-element format name and then either commits or aborts the entire transaction. This means that sending a message to a multiple-element format name within a transaction is semantically equivalent to sending a series of messages to individual queues within a single transaction.

Consider, for example, a multiple-element format name N1, which contains two queues Q1 and Q2, and a second multiple-element format name N2, which contains Q2 and Q3. Now consider a transaction consisting of the following three actions:

  1. Sending message M1 to N1.

  2. Sending message M2 to N2.

  3. Sending message M3 to Q2.

Messages M1, M2, and M3 will arrive at queue Q2 exactly once and in the order in which they were sent.

However, the guarantee of exactly-once and in-order delivery applies only to identical top-level elements of multiple-element format names and does not extend to queues that are members of different distribution lists referenced by multiple-element format names. Consider the case of two distribution lists D1 and D2, each of which contains queue Q1 as a member, a multiple-element format name N1, which contains D1 and another queue Q2 as elements, and another multiple-element format name N2, which contains D2 and Q2 as elements. If message M1 is sent to N1 and message M2 is sent to N2 within the same transaction, the messages will arrive at Q2 in the order in which they were sent, but they will not necessarily arrive at Q1 in that order.

Community Additions

ADD
Show: