Class RejectedDeliveryOutcome

java.lang.Object
com.azure.core.amqp.models.DeliveryOutcome
com.azure.core.amqp.models.RejectedDeliveryOutcome

public final class RejectedDeliveryOutcome extends DeliveryOutcome
The rejected delivery outcome.

At the target, the rejected outcome is used to indicate that an incoming message is invalid and therefore unprocessable. The rejected outcome when applied to a message will cause the delivery-count to be incremented in the header of the rejected message.

At the source, the rejected outcome means that the target has informed the source that the message was rejected, and the source has taken the necessary action. The delivery SHOULD NOT ever spontaneously attain the rejected state at the source.

See Also:
  • Constructor Details

    • RejectedDeliveryOutcome

      public RejectedDeliveryOutcome(AmqpErrorCondition errorCondition)
      Creates an instance with the given error condition.
      Parameters:
      errorCondition - The error condition.
  • Method Details

    • getErrorCondition

      public AmqpErrorCondition getErrorCondition()
      Diagnostic information about the cause of the message rejection.
      Returns:
      Diagnostic information about the cause of the message rejection.
    • getErrorDescription

      public String getErrorDescription()
      Gets the error description.
      Returns:
      Gets the error condition.
    • getErrorInfo

      public Map<String,Object> getErrorInfo()
      Gets a map of additional error information.
      Returns:
      Map of additional error information.
    • setErrorInfo

      public RejectedDeliveryOutcome setErrorInfo(Map<String,Object> errorInfo)
      Sets a map with additional error information.
      Parameters:
      errorInfo - Error information associated with the rejection.
      Returns:
      The updated RejectedDeliveryOutcome object.