PROPID_M_DELIVERY (Windows Embedded CE 6.0)
1/6/2010
This property specifies how MSMQ delivers the message to the queue.
- Type Indicator
VT_UI1 (or VT_NULL)
- PROPVARIANT Field
bVal
Property Values
This property can be set to one of the following values:- MQMSG_DELIVERY_RECOVERABLE. In every hop along its route, the message is forwarded to the next hop or stored locally in a backup file until delivered. This guarantees delivery even in case of a computer crash.
- MQMSG_DELIVERY_EXPRESS. The default. The message stays in memory until it can be delivered. The message is not recovered if the computer is rebooted.
Remarks
When the delivery mode of a message is set to MQMSG_DELIVERY_EXPRESS (the default setting), the message has faster throughput.
When the delivery mode is set to MQMSG_DELIVERY_RECOVERABLE, throughput can be slower, but MSMQ guarantees that the message is delivered, even if a computer crashes while the message is en route to the queue.
To set the delivery mode of a message, specify PROPID_M_DELIVERY in the MQMSGPROPS structure and call MQSendMessage.
To retrieve the delivery mode of a message, specify PROPID_M_DELIVERY in the MQMSGPROPS structure. Then call MQReceiveMessage and examine its returned value.
When specifying PROPID_M_DELIVERY, you can set its Type Indicator to VT_NULL. When the Type Indicator is set to VT_NULL, MSMQ sets the VT field to the appropriate type indicator.
When sending messages within a transaction, MSMQ sets the delivery mode of the transactional message to MQMSG_DELIVERY_RECOVERABLE.
Examples
This example shows how PROPID_M_DELIVERYis specified in the MQMSGPROPS structure.
aMsgPropId[i] = PROPID_M_DELIVERY; // Property ID
aMsgPropVar[i].vt = VT_UI1; // Type indicator
aMsgPropVar[i].bVal = MQMSG_DELIVERY_RECOVERABLE;
i++;
Note
OS versions prior to 2.12 require the MSMQ add-on pack.
Requirements
Header | mq.h |
Windows Embedded CE | Windows CE 2.0 and later |