MSMQQueueInfo.Journal

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

Optional. The Journal property of the MSMQQueueInfo object specifies the journaling level of the destination queue. The journaling level determines whether or not messages retrieved from the destination queue are stored in the journal of the queue.

Data type: Long
Run-time access: Read/write
Property Journal As Long  

Property Value

You can set Journal to either of the following values:

MQ_JOURNAL

When a message is removed from the queue, it is stored in the queue journal.

MQ_JOURNAL_NONE

The default. Messages are not stored in a queue journal when they are removed from the queue.

Remarks

The Journal property is used to enforce target journaling for the destination queue. When target journaling is enabled, Message Queuing stores a copy of each message removed from the queue in the destination queue's journal. For information on target journaling, see Target Journaling.

The size of the queue journal can be set using the MSMQQueueInfo.JournalQuota property.

Setting the Journal property does not create a queue journal. Queue journals are system queues generated by MSMQ. For information on queue journals, see Journal Queues.

Periodically clear messages from the queue journal to remove messages that are no longer needed. Message stored in the queue journal count against the quota of the journal and the quota of the computer where the journal resides (the computer quota is set by the administrator).

If the journal or computer quota is exceeded, Message Queuing will not send copies of messages to the journal when the messages are received.

To specify the journaling level when creating the queue, set the MSMQQueueInfo.PathName property and the MSMQQueueInfo.Journal property, and then call the MSMQQueueInfo.Create method.

To reset or retrieve the journaling level of an existing queue, your application must first obtain an MSMQQueueInfo object that represents the queue. This object can be returned by a query using the MSMQQuery.LookupQueue method or created by the sending or receiving application.

Before using an application-created MSMQQueueInfo object, the application must initialize it to reference the queue by setting its MSMQQueueInfo.PathName or MSMQQueueInfo.FormatName property. For public queues, setting the FormatName property with a cached public format name instead of the PathName property frees Message Queuing from the need to retrieve information stored in the directory service to generate this format name. Direct format names can be used only for local private queues.

To reset the journaling level of an existing queue, set Journal to a new level and call the MSMQQueueInfo.Update method. This method updates the queue information stored by Message Queuing. For public queues, this information is stored in the directory service. For private queues, this information is stored on the computer where the messages of the queue are stored.

To retrieve the stored journaling level of a queue, call the MSMQQueueInfo.Refresh method and inspect the Journal property. The property values of the MSMQQueueInfo object are not updated with the values stored by Message Queuing until the MSMQQueueInfo.Refresh method is called.

Equivalent API Function Property

With function calls, the equivalent property is PROPID_Q_JOURNAL.

Example Code

The following examples are included in Using Message Queuing.

For an example of See
Setting target journaling when creating a queue Visual Basic Code Example: Enforcing Target Journaling
Setting and retrieving the journaling level of an existing queue Visual Basic Code Example: Setting MSMQQueueInfo.Journal

 Visual Basic Code Example: Retrieving MSMQQueueInfo.Journal

Requirements

Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQQueueInfo
MSMQQueueInfo.Create
MSMQQueueInfo.JournalQuota
MSMQQueueInfo.Refresh
MSMQQueueInfo.Update
PROPID_Q_JOURNAL