다음을 통해 공유


PROPID_Q_JOURNAL (Windows Embedded CE 6.0)

1/6/2010

Optional. This property specifies the journaling level of the queue.

The journaling level indicates if messages retrieved from the queue are also copied to its journal queue.

  • Type Indicator
    VT_UI1
  • PROPVARIANT Field
    bVal
  • Property Values
    This property can be set to one of the following values.

    Value Description

    MQ_JOURNAL

    All messages removed from the specified queue are stored in its journal queue.

    MQ_JOURNAL_NONE

    The default. Messages are not stored in a journal queue. All messages removed from the specified queue are discarded.

Remarks

Specifying the journaling level does not create a queue journal.

Queue journals are system queues created by MSMQ. The application can only read the messages in a journal.

When you store messages in a journal queue, clear these queues periodically to remove messages that are no longer needed.

Messages stored in the journal queue count against the quota for the computer where the journal queue resides (the computer quota is set by the administrator).

To save removed messages in a journal queue, specify PROPID_Q_JOURNAL in the MQQUEUEPROPS structure and call MQCreateQueue when creating the queue.

In the embedded implementation of MSMQ, specifying MQ_JOURNAL with the MQSetQueueProperties function does not turn journaling on.

To have journaling, you must create a queue with journaling turned on.

To stop storing messages in the journal queue, specify PROPID_Q_JOURNAL in the MQQUEUEPROPS structure and call MQSetQueueProperties.

When the property value is changed, the remaining messages retrieved from the specified queue will be discarded.

To determine if removed messages are being stored in the journal queue, specify PROPID_Q_JOURNAL in the MQQUEUEPROPS structure and call MQGetQueueProperties and examine its returned value.

By default, MSMQ sets the size of a journal queue to INFINITE. To specify the size of a journal queue, see PROPID_Q_JOURNAL_QUOTA.

Examples

The following examples show how PROPID_Q_JOURNAL is specified in the MQQUEUEPROPS structure for setting and retrieving this property.

To set PROPID_Q_JOURNAL

aPropID[i] = PROPID_Q_JOURNAL;              // Property identifier
aVariant[i].vt = VT_UI1;                    // Type indicator
aVariant[i].bVal = MQ_JOURNAL;              // Journal queue is used
i++;

To retrieve PROPID_Q_JOURNAL

aPropID[i] = PROPID_Q_JOURNAL;              // Property identifier
aVariant[i].vt = VT_UI1;                    // Type indicator
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

See Also

Reference

MSMQ Properties
MQCreateQueue
MQGetQueueProperties
MQSetQueueProperties
PROPID_Q_JOURNAL_QUOTA
MQQUEUEPROPS