MessagePropertyFilter.UseDeadLetterQueue Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy pobierać UseDeadLetterQueue informacje o właściwości podczas odbierania lub przeglądania komunikatu.

public:
 property bool UseDeadLetterQueue { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgUseDeadLetterQueue")]
public bool UseDeadLetterQueue { get; set; }
[<System.Messaging.MessagingDescription("MsgUseDeadLetterQueue")>]
member this.UseDeadLetterQueue : bool with get, set
Public Property UseDeadLetterQueue As Boolean

Wartość właściwości

Boolean

true w celu otrzymywania UseDeadLetterQueue informacji; falsew przeciwnym razie . Wartość domyślna to true.

Atrybuty

Przykłady

W poniższym przykładzie kodu pokazano użycie UseDeadLetterQueue właściwości .

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's UseDeadLetterQueue property.
queue->MessageReadPropertyFilter->
    UseDeadLetterQueue = true;

// Peek at the message. Time out after ten seconds 
// in case the message was not delivered.
orderMessage = queue->Peek(TimeSpan::FromSeconds(10.0));

// Display the value of the message's 
// UseDeadLetterQueue property.
Console::WriteLine("Message.UseDeadLetterQueue: {0}", 
    orderMessage->UseDeadLetterQueue);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's UseDeadLetterQueue property.
queue.MessageReadPropertyFilter.UseDeadLetterQueue = true;

// Peek at the message. Time out after ten seconds in case the message
// was not delivered.
orderMessage = queue.Peek(TimeSpan.FromSeconds(10.0));

// Display the value of the message's UseDeadLetterQueue property.
Console.WriteLine("Message.UseDeadLetterQueue: {0}",
    orderMessage.UseDeadLetterQueue);

Uwagi

Właściwość UseDeadLetterQueue Message klasy określa, czy kopia komunikatu, którego nie można dostarczyć, powinna zostać wysłana do kolejki utraconych komunikatów.

Dotyczy

Zobacz też