2.2.19.2 UserHeader

The UserHeader contains source and destination information for the message in a UserMessage Packet.


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)

...

...

QueueManagerAddress (16 bytes)

...

...

TimeToBeReceived

SentTime

MessageID

Flags

DestinationQueue (variable)

...

AdminQueue (variable)

...

ResponseQueue (variable)

...

ConnectorType (16 bytes, optional)

...

...

SourceQueueManager (16 bytes): A GUID, as specified in [MS-DTYP] section 2.3.4, that MUST identify the original sender of the message.

QueueManagerAddress (16 bytes): A GUID, as specified in [MS-DTYP] section 2.3.4, that MUST identify the destination queue manager.

If the message is sent to a public or private queue, this field MUST be set to the GUID of the destination queue manager. If the message is sent to a queue that uses a direct format name, then this field MUST contain a NULL GUID.

TimeToBeReceived (4 bytes): A 32-bit unsigned integer that indicates the length of time, in seconds, that the message in the packet has before it expires. This field has a valid range from 0x00000000 to 0xFFFFFFFF. The value 0xFFFFFFFF indicates an infinite time.

This time is measured from when the sending protocol receives the message. If the value is exceeded, the message MUST be removed from the destination queue. For more details about message expiration see [MS-MQQB] section 3.1.5.8.5.

SentTime (4 bytes): A 32-bit unsigned integer that MUST be set to the time when the packet was sent. This value represents the number of seconds elapsed since midnight (00:00:00), January 1, 1970 UTC.

MessageID (4 bytes): A 32-bit unsigned integer that is the message identifier specified by the queue manager. The queue manager MUST generate a unique identifier for each message it sends. For more details, see the MessageIdOrdinal value in [MS-MQQB] section 3.1.1.3.

Flags (4 bytes): A 32-bit unsigned integer that contains a set of options that provide additional information about the packet. Any combination of these values is acceptable unless otherwise noted below.


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

RC

DM

A

B

C

DQ

AQ

RQ

D

E

F

G

H

I

J

X3

K

X4

RC (5 bits): The number of routing servers that have processed the UserMessage Packet. The values in this field MUST be in the range from 0x00 to 0x1D. For more details, see [MS-MQQB] section 3.1.5.8.2.

DM (2 bits): The delivery mode of the packet. The field MUST be set to one of the following values.

Value

Meaning

0x0

Express messaging. Express messages MUST NOT be required to be recoverable after the queue manager restarts.

0x1

Recoverable messaging (including transactional). Recoverable messages MUST be recovered after queue manager restarts.

Note a transactional message is a recoverable message that has UserHeader.Flags.TH set to 0x1.

A - X1 (1 bit): Reserved bit field. This field SHOULD NOT be set when sent and MUST be ignored on receipt.

B - JN (1 bit): Specifies if negative source journaling is enabled.<3> If set, the protocol SHOULD log a record locally in the event of message delivery failure.<4>

C - JP (1 bit): Specifies if positive source journaling is enabled. If set, the protocol SHOULD log a record locally if the message is successfully delivered.<5>

DQ (3 bits): Type of destination queue in UserHeader.DestinationQueue. The field MUST be set to 0x0, 0x3, 0x5, or 0x7. The value in this field determines the layout of the destination queue name in the UserHeader.DestinationQueue field.

AQ (3 bits): Type of administration queue in UserHeader.AdminQueue. The field MUST be set to 0x0, 0x2, 0x3, 0x5, 0x6 or 0x7. The value in this field determines the layout of the administration queue name in the UserHeader.AdminQueue field.

RQ (3 bits): Type of response queue in UserHeader.ResponseQueue. The field MUST be set to 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, or 0x7. The value in this field determines the layout of the response queue name in the UserHeader.ResponseQueue field.

D - SH (1 bit): Specifies if a SecurityHeader is present in the UserMessage Packet. If set, the packet MUST contain a SecurityHeader; otherwise, it MUST NOT.

E - TH (1 bit): Specifies if a TransactionHeader is present in the UserMessage Packet. If set, the packet MUST contain a TransactionHeader; otherwise, it MUST NOT. If this flag is set the DM flag MUST NOT be 0x0.

F - MP (1 bit): Specifies if a MessagePropertiesHeader is present in the UserMessage Packet. This flag MUST always be set.

G - CQ (1 bit): Specifies if the ConnectorType field is present in the packet. If set, the packet MUST contain a ConnectorType field; otherwise, it MUST NOT.

H - MQ (1 bit): Specifies if a MultiQueueFormatHeader is present in the UserMessage Packet. If set, the packet MUST contain a MultiQueueFormatHeader; otherwise, it MUST NOT.

I - X2 (1 bit): Reserved bit field. This field SHOULD NOT be set when sent and MUST be ignored on receipt.

J - AH (1 bit): Indicates if the packet being received was originally sent over HTTP, as specified in [MS-MQRR] section 2.2.5.1. This field MUST NOT be set when sent.

X3 (2 bits): Reserved bit field. This field SHOULD NOT be set when sent and MUST be ignored on receipt.

K - HH (1 bit): Specifies if a SoapHeader is present in the packet. If set, the UserMessage Packet MUST contain a SoapHeader; otherwise, it MUST NOT.

X4 (3 bits): Reserved bit field. This field SHOULD NOT be set when sent and MUST be ignored on receipt.

DestinationQueue (variable): The destination queue specifies the final destination of the message that is contained inside the UserMessage Packet. The queue type and data type of the destination queue name vary depending on the value specified in the Flags.DQ field, as described in the following table.

Flags.DQ

Queue type

Data type

0x0

None

None

0x3

Private queue on destination host

PrivateQueueFormatNameId

0x5

Public queue

PublicQueueFormatName

0x7

Direct

DirectQueueFormatName

When the Flags.DQ field is set to 0x03 or 0x5, the QueueManagerAddress field MUST be set to the GUID of the destination queue manager.

Any value for Flags.DQ other than those specified in the preceding table MUST be treated as an error by closing the session.

AdminQueue (variable): The name of the administration queue. This field specifies the response queue where administration acknowledgment messages are sent. An administration response queue MUST be specified if a MessagePropertiesHeader is included and any bits are set in the MessagePropertiesHeader.Flags field; otherwise, this field MUST NOT be specified. Details about administration acknowledgments are as specified in [MS-MQQB] sections 1.3.5.2 and 3.1.5.8.10. The queue type and data type of the administration queue name vary depending on the value specified in the Flags.AQ field, as described in the following table. This field MUST be present when the Flags.AQ field is set to 0x2, 0x3, 0x5, 0x6, or 0x7. This field MUST NOT be present when the Flags.AQ field is set to 0x0.

Flags.AQ

Queue type

Data type

0x0

None

None

0x2

Private queue on source host

PrivateQueueFormatNameId

0x3

Private queue on destination host

PrivateQueueFormatNameId

0x5

Public queue

PublicQueueFormatName

0x6

Private queue on host other than the source or destination host

PrivateQueueFormatName

0x7

Direct

DirectQueueFormatName

Any value for the Flags.AQ field other than those specified in the preceding table MUST be treated as an error by closing the session.

ResponseQueue (variable): A variable-length array of bytes containing the name of the response queue. The response queue is an application-defined value that specifies a queue that a receiving application could use to send a reply message. The queue type and data type of the response queue name vary depending on the queue format type specified in the Flags.RQ field, as described in the following table. This field MUST be present when the Flags.RQ field is set to 0x1, 0x2, 0x3, 0x5, 0x6, or 0x7. This field MUST NOT be present when the Flags.RQ field is set to 0x0 or 0x1. When the Flags.RQ flag is set to 0x1, the response queue is the same as the administration queue. When the Flags.RQ field is set to 0x4, the PrivateQueueIdentifier in the queue format type MUST identify the private queue on the queue manager that hosts the administration queue.

Flags.RQ

Queue type

Data type

0x0

None

None

0x1

Same as the administration queue

None

0x2

Private queue on source host

PrivateQueueFormatNameId

0x3

Private queue on destination host

PrivateQueueFormatNameId

0x4

Private queue on the same host as the administration queue

PrivateQueueFormatNameId

0x5

Public queue

PublicQueueFormatName

0x6

Private queue on a host other than the source queue, destination queue, or administration queue host

PrivateQueueFormatName

0x7

Direct

DirectQueueFormatName

ConnectorType (16 bytes): An optional field that represents an application-defined GUID, as specified in [MS-DTYP] section 2.3.4. This field MUST be present if and only if the Flags.CQ field is set. This field is used by higher-layer messaging applications. The server MUST NOT process or interpret this field.