Partager via


MSMQMessage.Journal (Windows Embedded CE 6.0)

1/6/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.Journal can specify positive source journaling, negative source journaling, or both.

MSMQMessage.Journal can 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.

Ee500322.collapse(en-US,WinEmbedded.60).gifNegative 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.

    XactDeadLetterAlways
    

    The default negative source journaling semantics for transactional messages are:

    • Negative source journaling always: The XactDeadLetterAlways registry 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 XactDeadLetterAlways registry 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.

Ee500322.collapse(en-US,WinEmbedded.60).gifProcessing 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).

Ee500322.collapse(en-US,WinEmbedded.60).gifCreating computer journal and dead-letter queues

Setting MSMQMessage.Journal to 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.

Ee500322.collapse(en-US,WinEmbedded.60).gifEquivalent Function property

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

Requirements

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

See Also

Reference

MSMQMessage
MSMQMessage.Send
PROPID_M_JOURNAL