Class ModifiedDeliveryOutcome
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 Summary
ConstructorDescriptionCreates an instance with the delivery state modified set. -
Method Summary
Modifier and TypeMethodDescriptionGets a map containing attributes to combine with the existing message-annotations held in the message's header section.Gets whether or not to count the transfer as an unsuccessful delivery attempt.Gets whether or not the message is undeliverable here.setDeliveryFailed
(boolean isDeliveryFailed) Sets whether or not to count the transfer as an unsuccessful delivery attempt.setMessageAnnotations
(Map<String, Object> messageAnnotations) Sets the message annotations to add to the message.setUndeliverableHere
(boolean isUndeliverable) Sets whether or not the message is undeliverable here.Methods inherited from class com.azure.core.amqp.models.DeliveryOutcome
getDeliveryState
-
Constructor Details
-
ModifiedDeliveryOutcome
public ModifiedDeliveryOutcome()Creates an instance with the delivery state modified set.
-
-
Method Details
-
isUndeliverableHere
Gets whether or not the message is undeliverable here.- Returns:
true
to not redeliver message.
-
setUndeliverableHere
Sets whether or not the message is undeliverable here.- Parameters:
isUndeliverable
- If the message is undeliverable here.- Returns:
- The updated
ModifiedDeliveryOutcome
outcome.
-
isDeliveryFailed
Gets whether or not to count the transfer as an unsuccessful delivery attempt.- Returns:
true
to increment the delivery count.
-
setDeliveryFailed
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
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
Sets the message annotations to add to the message.- Parameters:
messageAnnotations
- the message annotations to add to the message.- Returns:
- The updated
ModifiedDeliveryOutcome
object.
-