Editar

Partilhar via


MsmqMessage<T>.Priority Property

Definition

Gets or sets the MessagePriority that is associated with this message.

public:
 property Nullable<System::Messaging::MessagePriority> Priority { Nullable<System::Messaging::MessagePriority> get(); void set(Nullable<System::Messaging::MessagePriority> value); };
public System.Messaging.MessagePriority? Priority { get; set; }
member this.Priority : Nullable<System.Messaging.MessagePriority> with get, set
Public Property Priority As Nullable(Of MessagePriority)

Property Value

The MessagePriority that is associated with this message. May be null.

Examples

message.Priority = MessagePriority.Normal;
message.Priority = MessagePriority.Normal

Remarks

The message priority affects how Message Queuing (MSMQ) handles the message both while the message is in transit and when it reaches its destination queue. A message with a higher priority is given preference during routing, and is inserted closer to the front of its destination queue. Messages with the same priority are placed in the destination queue according to their arrival times.

Applies to