Interface MessageBuilder
- All Known Implementing Classes:
WrapperMessageBuilder
public interface MessageBuilder
API to configure and create a
Message.
A MessageBuilder is meant to create only one message, it should not be re-used for
several message instances.
Please see section 3.2 "message format" of the AMQP 1.0 specification to find out about the exact meaning of the message sections.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAPI to set application properties.static interfaceAPI to set message annotations.static interfaceAPI to set message properties. -
Method Summary
Modifier and TypeMethodDescriptionaddData(byte[] data) Set binary data of the message.The builder to set application properties.build()Create the message.The builder to set message annotations.The builder forProperties.publishingId(long publishingId) Set the publishing ID (for deduplication).
-
Method Details
-
build
-
publishingId
Set the publishing ID (for deduplication).This is value is used only for outbound messages and is not persisted.
- Parameters:
publishingId-- Returns:
- this builder instance
- See Also:
-
properties
MessageBuilder.PropertiesBuilder properties()The builder forProperties.- Returns:
- the properties builder
- See Also:
-
applicationProperties
MessageBuilder.ApplicationPropertiesBuilder applicationProperties()The builder to set application properties.- Returns:
- the application properties builder
- See Also:
-
messageAnnotations
MessageBuilder.MessageAnnotationsBuilder messageAnnotations()The builder to set message annotations.- Returns:
- the message annotations builder
- See Also:
-
addData
Set binary data of the message.- Parameters:
data-- Returns:
- this builder instance
- See Also:
-