Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This property specifies how Message Queuing tracks messages as they are routed to the destination queue.

Syntax

HRESULT get_Journal( 
  long* 
plJournal 
);
HRESULT put_Journal( 
  long 
lJournal
);

Parameters

plJournalor lJournal

Value that indicates how Message Queuing tracks messages routed to the destination queue. The following table shows the possible values.

Value Description

MQMSG_DEADLETTER

Negative source journaling is requested. Messages are stored in dead-letter queues on failure.

For nontransactional messages, failure means that the computer could not deliver the message to the next computer (for example, if a message timer expires).

For transactional messages, failure means that the source queue manager did not receive a confirmation that the message was removed from its destination queue.

MQMSG_JOURNAL

Positive source journaling is requested. A copy of the message is stored in a computer journal on the computer if the message was successfully delivered to the next computer.

MQMSG_JOURNAL_NONE

The default. The message is not kept in the originating computer's computer journal.

Return Value

The following table describes the common return values.

Value Description

S_OK

Success

E_INVALIDARG

One or more arguments are invalid

E_NOTIMPL

The function contains no implementation

E_OUTOFMEMORY

Out of memory

Remarks

MSMQMessage.Journalcan specify positive source journaling, negative source journaling, or both.

MSMQMessage.Journalcan be set to the following combinations.

  • MQMSG_JOURNAL: Positive source journaling is requested. Messages are stored in computer journals on success but not in dead-letter queues on failure.

  • MQMSG_DEADLETTER: Negative source journaling is requested. Messages are stored in dead-letter queues on failure, but not in computer journals on success.

  • MQMSG_JOURNAL | MQMSG_DEADLETTER: Positive and negative source journaling is requested. Messages are stored in computer journals on success and stored in dead-letter queues on failure.

  • MQMSG_JOURNAL_NONE: Source journaling is disabled (default). Copies of messages are not stored in computer journals on success nor in dead-letter queues on failure.

Negative source journaling

Negative source journaling uses nontransactional and transactional dead-letter queues to store message that fail:

  • For nontransactional messages, failure means that a computer could not deliver the message.

  • For transactional messages, failure means that the source queue manager did not receive a confirmation that the transactional message was removed from the destination queue.

    Copies of failed transactional messages are placed only in the transactional dead-letter queue of the source computer.

    The default semantics for the source computer can be changed by setting the following registry to one of two settings.

    Copy Code
    XactDeadLetterAlways
    
    The default negative source journaling semantics for transactional messages are:

    • Negative source journaling always: The XactDeadLetterAlwaysregistry key is set to 1.

      When this default is used, Message Queuing puts a copy of every unconfirmed message in the transactional dead-letter queue of the source computer regardless of what the journaling property of the transactional messages are set to. These are the default semantics for MSMQ 1.0.

    • Negative source journaling optional: The XactDeadLetterAlwaysregistry key is set to 0.

      When this default is used, Message Queuing places a copy of unconfirmed transactional messages in the transactional dead-letter queue of the source computer only when the journaling property of the message specifies MQMSG_DEADLETTER. This is the default semantics for MSMQ 2.0.

Processing messages in computer journal and dead-letter queues

Processing messages in computer journals and dead-letter queues is the responsibility of the application or the Message Queuing administrator.

Messages should be removed from these queues on a regular basis so they do not consume the resources of the computer.

Messages stored in dead-letter queues count against the quota of the computer (the computer quota is set by Message Queuing administrator).

Creating computer journal and dead-letter queues

Setting MSMQMessage.Journalto positive or negative journaling does not create a computer journal or dead-letter queue. Computer journal and dead-letter queues are system queues generated by Message Queuing.

Equivalent Function property

When using functions, the journaling level of the message can be set and retrieved using the PROPID_M_JOURNALproperty.

Requirements

Header mqoai.h
Library mqoa.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also