Export (0) Print
Expand All

Message.UseJournalQueue Property

Gets or sets a value that indicates whether a copy of the message should be kept in a machine journal on the originating computer.

Namespace:  System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

[MessagingDescriptionAttribute("MsgUseJournalQueue")]
public bool UseJournalQueue { get; set; }

Property Value

Type: System.Boolean
true to require that a copy of a message be kept in the originating computer's machine journal after the message has been successfully transmitted (from the originating computer to the next server); otherwise, false. The default is false.

ExceptionCondition
InvalidOperationException

The message queue is filtered to ignore the UseJournalQueue property.

The UseJournalQueue and UseDeadLetterQueue properties specify how Message Queuing tracks a message. If UseJournalQueue is true, then a copy is kept in the computer journal on the originating machine at each step that a message is transmitted.

The sent message is only copied to the journal queue if the destination queue is on a remote computer. If the destination is on the local computer, the message is sent directly to the queue; there are no intermediate steps to require journaling.

When you store messages in a journal queue, clear the queue periodically to remove messages that are no longer needed. Messages stored in journal queues count against the quota for the computer where the queue resides. (The computer quota is set by the administrator.)

You do not create a journal or dead-letter queue. These are both system queues that Message Queuing generates.

The following code example gets and sets the value of a message's UseJournalQueue property.

// Set the message's UseJournalQueue property.
orderMessage.UseJournalQueue = true;

// Display the new value of the message's UseJournalQueue property.
Console.WriteLine("Message.UseJournalQueue: {0}",
    orderMessage.UseJournalQueue);

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft