MessageOutcome Event

Fires when a message's outcome is available.

Syntax

public event OnMessageOutcomeHandler OnMessageOutcome;

public delegate void OnMessageOutcomeHandler(object sender, AmqpMessageOutcomeEventArgs e);

public class AmqpMessageOutcomeEventArgs : EventArgs {
  public string SessionName { get; }
  public int SessionIndex { get; }
  public string LinkName { get; }
  public int LinkIndex { get; }
  public string MessageId { get; }
  public int Direction { get; }
  public int State { get; }
}
Public Event OnMessageOutcome As OnMessageOutcomeHandler

Public Delegate Sub OnMessageOutcomeHandler(sender As Object, e As AmqpMessageOutcomeEventArgs)

Public Class AmqpMessageOutcomeEventArgs Inherits EventArgs
  Public ReadOnly Property SessionName As String
  Public ReadOnly Property SessionIndex As Integer
  Public ReadOnly Property LinkName As String
  Public ReadOnly Property LinkIndex As Integer
  Public ReadOnly Property MessageId As String
  Public ReadOnly Property Direction As Integer
  Public ReadOnly Property State As Integer
End Class

Remarks

This event fires whenever the outcome for a message (incoming or outgoing) is available.

SessionName is the name of the session the message was transmitted on.

SessionIndex is the index of the session in the Sessions collection property.

LinkName is the name of the link the message was transmitted on.

LinkIndex is the index of the link in the Links collection property.

MessageId is the Id of the message; it may be empty if a message Id was not set.

Direction indicates whether this outcome was sent (0) or received (1).

State indicates the actual message outcome. Possible values are:

  • 0: Accepted - The message has been processed successfully.
  • 1: Rejected - The message failed to process successfully. Includes an error describing why.
  • 2: Released - The message has not been (and will not be) processed.
  • 3: Modified - Same as "Released", but with additional metadata for the sender.

When State is Rejected (1), the RejectErrorCondition and RejectErrorDescription configuration settings can be queried before the event handler finishes to retrieve the error information.

When State is Modified (3), the ModifiedDeliveryFailed, ModifiedMessageAnnotations, and ModifiedUndeliverableHere configuration settings can be queried before the event handler finishes to retrieve the additional metadata.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks MQ 2020 .NET Edition - Version 20.0 [Build 8155]