MessagePropertyFilter.UseDeadLetterQueue Свойство

Определение

Получает или задает значение, указывающее, следует ли извлекать сведения свойства UseDeadLetterQueue при получении или считывании сообщения.

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

Значение свойства

Значение true означает получение сведений UseDeadLetterQueue, в противном случае — значение false. Значение по умолчанию — true.

Атрибуты

Примеры

В следующем примере кода демонстрируется использование 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);
// 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);

Комментарии

Свойство UseDeadLetterQueueMessage класса указывает, следует ли отправлять копию сообщения, которое не удалось доставить, в очередь недоставленных сообщений.

Применяется к

См. также раздел