2.2.5.1 UserMessage

The UserMessage structure can be either a Binary Message (section 2.2.5.1.1) or an SRMP Message (section 2.2.5.1.2), depending on the transport over which the message was originally sent. A Binary Message is sent over the MSMQ: Binary Reliable Messaging Protocol [MS-MQQB], while an SRMP Message is sent over HTTP. The message type is indicated by the UserHeader.Flags.AH bit field, which is set for SRMP Messages as specified in the definition of the UserHeaderEnd field in this section.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

BaseHeader (16 bytes)

...

...

UserHeader (variable)

...

TransactionHeader (variable)

...

SecurityHeader (variable)

...

MessagePropertiesHeader (variable)

...

DebugHeader (variable)

...

SRMPEnvelopeHeader (variable)

...

CompoundMessageHeader (variable)

...

SoapHeader (variable)

...

MultiQueueFormatHeader (variable)

...

SessionHeader (16 bytes, optional)

...

...

BaseHeader (16 bytes): A BaseHeader ([MS-MQMQ] section 2.2.19.1). The TimeToReachQueue field has the same length and format as that specified in [MS-MQMQ] but differs in that it represents the absolute expiration time of the message as the number of seconds elapsed since midnight (00:00:00), January 1, 1970 Coordinated Universal Time (UTC).

UserHeader (variable): A UserHeader ([MS-MQMQ] section 2.2.19.2) with the following field overlays, which pertain when the UserHeader specifies that the destination queue is a direct format name. In this case, the QueueManagerAddress field specifies the host address from which a message was received. If the UserHeader specifies that the destination queue is anything other than a direct format name, the 16 bytes after the SourceQueueManager field are set to the GUID of the host from which the message was received, as specified in [MS-MQMQ] section 2.2.19.2.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

SourceQueueManager (16 bytes)

...

...

AddressLength

AddressType

AddressScope

Address

...

UserHeaderEnd (variable)

...

SourceQueueManager  (16 bytes): A GUID ([MS-DTYP] section 2.3.4.1) that identifies the sender of the message.

AddressLength (2 bytes): A USHORT ([MS-DTYP] section 2.2.58) that MUST be the actual address length in the Address field.

AddressType (2 bytes): A USHORT that MUST be set to one of the following values.

Value

Meaning

IP_ADDRESS_TYPE

0x0001

The address specified in the Address field is an IPv4 address.

IPV6_ADDRESS_TYPE

0x0006

The address specified in the Address field is an IPv6 address.

AddressScope (4 bytes): A ULONG ([MS-DTYP] section 2.2.51) that MUST be set either to the IPv6 address scope if the AddressType field is IPV6_ADDRESS_TYPE or otherwise to 0x00000000. More details are specified in [RFC2553] section 3.3.

Address (8 bytes): An 8-byte array of UCHAR ([MS-DTYP] section 2.2.45) that MUST contain the address of the host from which the message was received. The field MUST contain as much of the address as can fit in the field. More details are specified in [RFC2553] section 3.3.

UserHeaderEnd (variable): A variable-length buffer mapped by a UserHeader beginning with the TimeToBeReceived field. Within the Flags field, the AH bit field MUST be set only if both the SOAPEnvelope and the SOAPCompoundMessage ADM attributes of the Message ([MS-MQDMPR] section 3.1.1.12) ADM element are populated.

TransactionHeader (variable): A TransactionHeader ([MS-MQMQ] section 2.2.20.5).

SecurityHeader (variable): A SecurityHeader ([MS-MQMQ] section 2.2.20.6).

MessagePropertiesHeader (variable): A MessagePropertiesHeader ([MS-MQMQ] section 2.2.19.3).

DebugHeader (variable): A DebugHeader [MS-MQMQ] section 2.2.20.8).

SRMPEnvelopeHeader (variable): An SRMPEnvelopeHeader (section 2.2.5.1.2.1).

CompoundMessageHeader (variable): A CompoundMessageHeader (section 2.2.5.1.2.2).

SoapHeader (variable): A SoapHeader ([MS-MQMQ] section 2.2.20.7).

MultiQueueFormatHeader (variable): A MultiQueueFormatHeader ([MS-MQMQ] section 2.2.20.1).

SessionHeader (16 bytes): A SessionHeader ([MS-MQMQ] section 2.2.20.4). The SessionHeader is used to acknowledge express and recoverable UserMessage Packets ([MS-MQMQ] section 2.2.20) when they are sent on a session. This header MUST be present if and only if the BaseHeader.Flags.SH bit field of the UserMessage Packet is set. This bit is set when the SessionHeader is piggy-backed onto a UserMessage Packet instead of sending it in a stand-alone SessionAck Packet ([MS-MQQB] section 2.2.6).

More details about the following individual headers, with the exceptions of SRMPEnvelopeHeader (section 2.2.5.1.2.1) and CompoundMessageHeader (section 2.2.5.1.2.2), are specified in [MS-MQQB] section 2.2.20.

In addition, the following exceptions also exist on the field attributes as specified in [MS-MQQB]. The overall structure of the data is the same; however, particular fields have been overridden or have different meanings in this protocol. The size of each overridden field is the same size as the original field.

UserMessage.BaseHeader.TimeToReachQueue

The definition for TimeToReachQueue differs from what is specified in [MS-MQQB] section 2.2.20 in the following manner:

  • In [MS-MQQB], this field indicates the length of time, in seconds, that a UserMessage Packet has to reach its destination queue manager.

  • In [MS-MQRR], this field indicates the absolute expiration time of the message defined as the number of seconds elapsed since midnight (00:00:00), January 1, 1970 UTC.