PROPID_Q_TRANSACTION

Optional. The PROPID_Q_TRANSACTION property specifies whether the queue is a transaction queue or a non-transaction queue.

Type Indicator
VT_UI1
PROPVARIANT Field
bVal
Property Values
This property can be set to one of the following values:
MQ_TRANSACTIONAL
All messages sent to the queue must be done through an MSMQ transaction.
MQ_TRANSACTIONAL_NONE
The default. No transaction operations can be performed on the queue.

Remarks

If a queue is transactional, it can only accept messages that are sent as part of a transaction (see MQSendMessage). However, messages can be retrieved from a local transaction queue with or without using a transaction (see MQReceiveMessage).

For information on how MSMQ performs transactions, see MSMQ Transactions.

To create a transaction queue, set PROPID_Q_TRANSACTION to MQ_TRANSACTIONAL and pass it to MQCreateQueue.

PROPID_Q_TRANSACTION cannot be changed once the queue is created. If an attempt is made to set it afterward, an MQ_ERROR_PROPERTY error is returned to the call and the property's associated aStatus entry will contain MQ_PROPERTY_NOTALLOWED.

To determine if the queue is a transaction queue, pass PROPID_Q_TRANSACTION to MQGetQueueProperties and examine its returned value.

See Also

MQCreateQueue, MQGetQueueProperties, MQReceiveMessage, MQSendMessage


© 1997 by Microsoft Corporation. All rights reserved.