Class ModifiedDeliveryOutcome

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

public final class ModifiedDeliveryOutcome extends DeliveryOutcome
The modified outcome.

At the source the modified outcome means that the message is no longer acquired by the receiver, and has been made available for (re-)delivery to the same or other targets receiving from the node. The message has been changed at the node in the ways indicated by the fields of the outcome. As modified is a terminal outcome, transfer of payload data will not be able to be resumed if the link becomes suspended. A delivery can become modified at the source even before all transfer frames have been sent. This does not imply that the remaining transfers for the delivery will not be sent. The source MAY spontaneously attain the modified outcome for a message (for example the source might implement some sort of time-bound acquisition lock, after which the acquisition of a message at a node is revoked to allow for delivery to an alternative consumer with the message modified in some way to denote the previous failed, e.g., with delivery-failed set to true).

At the target, the modified outcome is used to indicate that a given transfer was not and will not be acted upon, and that the message SHOULD be modified in the specified ways at the node.

See Also:
  • Constructor Details

    • ModifiedDeliveryOutcome

      public ModifiedDeliveryOutcome()
      Creates an instance with the delivery state modified set.
  • Method Details

    • isUndeliverableHere

      public Boolean isUndeliverableHere()
      Gets whether or not the message is undeliverable here.
      Returns:
      true to not redeliver message.
    • setUndeliverableHere

      public ModifiedDeliveryOutcome setUndeliverableHere(boolean isUndeliverable)
      Sets whether or not the message is undeliverable here.
      Parameters:
      isUndeliverable - If the message is undeliverable here.
      Returns:
      The updated ModifiedDeliveryOutcome outcome.
    • isDeliveryFailed

      public Boolean isDeliveryFailed()
      Gets whether or not to count the transfer as an unsuccessful delivery attempt.
      Returns:
      true to increment the delivery count.
    • setDeliveryFailed

      public ModifiedDeliveryOutcome setDeliveryFailed(boolean isDeliveryFailed)
      Sets whether or not to count the transfer as an unsuccessful delivery attempt.
      Parameters:
      isDeliveryFailed - true to count the transfer as an unsuccessful delivery attempt.
      Returns:
      The updated ModifiedDeliveryOutcome outcome.
    • getMessageAnnotations

      public Map<String,Object> getMessageAnnotations()
      Gets a map containing attributes to combine with the existing message-annotations held in the message's header section. Where the existing message-annotations of the message contain an entry with the same key as an entry in this field, the value in this field associated with that key replaces the one in the existing headers; where the existing message-annotations has no such value, the value in this map is added.
      Returns:
      Map containing attributes to combine with existing message annotations on the message.
    • setMessageAnnotations

      public ModifiedDeliveryOutcome setMessageAnnotations(Map<String,Object> messageAnnotations)
      Sets the message annotations to add to the message.
      Parameters:
      messageAnnotations - the message annotations to add to the message.
      Returns:
      The updated ModifiedDeliveryOutcome object.