How to: Store Messages in Journal Queues
There are two ways you can set up the use of journal queues for sent messages — you can set a default property for your MessageQueue component so that all messages sent by it will use journals, or you can establish journal queue recording for individual messages you are sending.
For an overview of journal storage, see Message Queue Journal Storage.
To use journals for all messages sent by an instance of the MessageQueue component
Create an instance of the MessageQueue component and set its Path property to the queue to which you want to refer. For more information, see How to: Create MessageQueue Component Instances.
In the Properties window, set the UseJournalQueue property on the DefaultPropertiesToSend class for your component to true.
To set journal recording for an individual message
Create the message you want to send.
In code, set the UseJournalQueue property to true. Your code might look like this:
Message1.UseJournalQueue = True
Message1.UseJournalQueue = true;
To set journal recording for messages removed from a queue
Create an instance of the MessageQueue component and set its Path property to the queue to which you want to refer. For more information, see How to: Create MessageQueue Component Instances.
Set the UseJournalQueue property for the MessageQueue component that references that queue to true. Your code might look like this:
MessageQueue1.UseJournalQueue = True
MessageQueue1.UseJournalQueue = true;
To set the maximum size for a journal queue
Create an instance of the MessageQueue component and set its Path property to the journal queue you want to refer to. For more information, see How to: Create MessageQueue Component Instances.
Set the MaximumJournalSize property to the capacity, in kilobytes, that you want to use for your journal queue.
See Also
Tasks
How to: Request Acknowledgement for Messages
How to: Create MessageQueue Component Instances