Partager via


MSMQMessage.Trace

 

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

The Trace property of the MSMQMessage object specifies how Message Queuing traces the route of the message.

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

Property Value

The Trace property can be set to one of the following values:

MQMSG_SEND_ROUTE_TO_REPORT_QUEUE

Tracing is requested. Each hop made by the original message generates a report message that is sent to a report queue.

MQMSG_TRACE_NONE

The default. Tracing is not requested.

Remarks

When tracing is enabled and a report queue is specified, report messages are created and sent to the report queue each time the message leaves or arrives at a Message Queuing computer. For example, report messages are generated at the following time.

  • When the message leaves the source computer one report message is generated.

  • When the message arrives at and leaves a routing server two report messages are generated.

  • When the message arrives the target computer where the destination queue resides one report message is generated.

Report queues are specified by the computer. If MQMSG_SEND_ROUTE_TO_REPORT_QUEUE is specified but the report queue is not specified, this property is ignored. For information on selecting report queues and what is contained in a report message, see Tracing Messages.

Note

Message Queuing does not support tracing under the following conditions:

When you send messages to multiple destinations using distribution lists, multicast addresses, and multiple-element format names.

When you send HTTP messages.

Equivalent API Function Property

With API function calls, the equivalent property is PROPID_M_TRACE.

Example Code

The following examples are included in Using Message Queuing.

For an example of See
Sending messages that request tracing Visual Basic Code Example: Requesting Tracing
Reading report messages in a report queue Visual Basic Code Example: Reading Report Messages

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

MSMQMessage
PROPID_M_TRACE