MessageSession.OnBeginDeadLetter Method

Executes upon calling the OnDeadLetter or BeginDeadLetter operation.

Namespace:  Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

Syntax

'Declaration
Protected Overrides Function OnBeginDeadLetter ( _
    trackingContext As TrackingContext, _
    lockTokens As IEnumerable(Of Guid), _
    propertiesToModify As IDictionary(Of String, Object), _
    deadLetterReason As String, _
    deadLetterErrorDescription As String, _
    timeout As TimeSpan, _
    callback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim trackingContext As TrackingContext
Dim lockTokens As IEnumerable(Of Guid)
Dim propertiesToModify As IDictionary(Of String, Object)
Dim deadLetterReason As String
Dim deadLetterErrorDescription As String
Dim timeout As TimeSpan
Dim callback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = Me.OnBeginDeadLetter(trackingContext, _
    lockTokens, propertiesToModify, _
    deadLetterReason, deadLetterErrorDescription, _
    timeout, callback, state)
protected override IAsyncResult OnBeginDeadLetter(
    TrackingContext trackingContext,
    IEnumerable<Guid> lockTokens,
    IDictionary<string, Object> propertiesToModify,
    string deadLetterReason,
    string deadLetterErrorDescription,
    TimeSpan timeout,
    AsyncCallback callback,
    Object state
)
protected:
virtual IAsyncResult^ OnBeginDeadLetter(
    TrackingContext^ trackingContext, 
    IEnumerable<Guid>^ lockTokens, 
    IDictionary<String^, Object^>^ propertiesToModify, 
    String^ deadLetterReason, 
    String^ deadLetterErrorDescription, 
    TimeSpan timeout, 
    AsyncCallback^ callback, 
    Object^ state
) override
abstract OnBeginDeadLetter : 
        trackingContext:TrackingContext * 
        lockTokens:IEnumerable<Guid> * 
        propertiesToModify:IDictionary<string, Object> * 
        deadLetterReason:string * 
        deadLetterErrorDescription:string * 
        timeout:TimeSpan * 
        callback:AsyncCallback * 
        state:Object -> IAsyncResult 
override OnBeginDeadLetter : 
        trackingContext:TrackingContext * 
        lockTokens:IEnumerable<Guid> * 
        propertiesToModify:IDictionary<string, Object> * 
        deadLetterReason:string * 
        deadLetterErrorDescription:string * 
        timeout:TimeSpan * 
        callback:AsyncCallback * 
        state:Object -> IAsyncResult 
protected override function OnBeginDeadLetter(
    trackingContext : TrackingContext, 
    lockTokens : IEnumerable<Guid>, 
    propertiesToModify : IDictionary<String, Object>, 
    deadLetterReason : String, 
    deadLetterErrorDescription : String, 
    timeout : TimeSpan, 
    callback : AsyncCallback, 
    state : Object
) : IAsyncResult

Parameters

  • deadLetterReason
    Type: System.String
    The reason for deadlettering the messages.
  • deadLetterErrorDescription
    Type: System.String
    The error description for deadlettering the messages.
  • timeout
    Type: System.TimeSpan
    The time span the operation waits before it times out.
  • state
    Type: System.Object
    A user-defined object that contains state information about the asynchronous operation.

Return Value

Type: System.IAsyncResult
An IAsyncResult that references the asynchronous operation to get the state of the operation.

See Also

Reference

MessageSession Class

Microsoft.ServiceBus.Messaging Namespace