Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

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()

IMessagePropertiesBuilder* addMetadata(MessageMetadata* metadata)
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.

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()

IMessagePropertiesBuilder* 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.

Returns

IMessagePropertiesBuilder* An IMessagePropertiesBuilder instance that can be used for further calls.

requireDeliveryConfirmation()

IMessagePropertiesBuilder* requireDeliveryConfirmation()
Requires the system to confirm delivery of this message. When set, 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()

IMessagePropertiesBuilder* conflictResolutionHint(string packageId)
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.

Parameters

packageId
string — Required The package id to decide conflict resolution.

Returns

IMessagePropertiesBuilder* An IMessagePropertiesBuilder instance that can be used for further calls.

build()

IMessageProperties* build()
Builds an IMessageProperties object with the configured properties.

Returns

IMessageProperties* An IMessageProperties instance to use with IMessageBuilder::messageProperties().
Last modified on October 29, 2026