Interface IMessagePropertiesBuilder
interface IMessagePropertiesBuilder
Extends com.amazon.apmf.IStandard
Message Properties Builder is used to provide hints to the OS on special
handling needs for the given message.
Methods
addMetadata()
Adds MessageMetadata to a message. Each type of MessageMetadata provides the OS with additional information on how it should handle a message. Adding message metadata is optional.IMessagePropertiesBuilder*addMetadata(MessageMetadata*metadata)
Parameters
metadata
MessageMetadata* — Required
The metadata to attach; must be a concrete subtype
defined by a domain-specific IDL.
Returns
IMessagePropertiesBuilder*
An IMessagePropertiesBuilder instance that can be used for
further calls.
markUrgent()
Hints that the system should treat this unicast message as urgent. Urgent messages cause eligible recipients to be quickly (re)started to handle the message. By default, all messages are deferrable: inactive recipients are not (re)started immediately and may receive the message when the system is able to run them. Calling this method on a builder is idempotent. Has no effect on broadcast messages, which ignore priority.IMessagePropertiesBuilder*markUrgent()
Returns
IMessagePropertiesBuilder*
An IMessagePropertiesBuilder instance that can be used for
further calls.
requireDeliveryConfirmation()
Requires the system to confirm delivery of this message. When set,IMessagePropertiesBuilder*requireDeliveryConfirmation()
IMessageListener::onMessageDelivered() fires once on the listener
supplied to IMessagingModule::send() after all targets have either
received or rejected the message. When not set, onMessageDelivered()
does not fire, even when a listener is supplied; the listener still
receives responses and errors. Calling this method on a builder is
idempotent.
Returns
IMessagePropertiesBuilder*
An IMessagePropertiesBuilder instance that can be used for
further calls.
conflictResolutionHint()
Hints that the system should use the given package id out of multiple possible packages that have a matching message target for the given Uri. If the hint does not match any of the candidates the message send fails. Calling the method overwrites any previously set value.IMessagePropertiesBuilder*conflictResolutionHint(stringpackageId)
Parameters
packageId
string — Required
The package id to decide conflict resolution.
Returns
IMessagePropertiesBuilder*
An IMessagePropertiesBuilder instance that can be used for
further calls.
build()
Builds anIMessageProperties*build()
IMessageProperties object with the configured properties.
Returns
IMessageProperties*
An IMessageProperties instance to use with
IMessageBuilder::messageProperties().

