Package com.rabbitmq.stream
Interface MessageBuilder
-
- All Known Implementing Classes:
WrapperMessageBuilder
public interface MessageBuilderAPI to configure and create aMessage.A
MessageBuilderis 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:
Message
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceMessageBuilder.ApplicationPropertiesBuilderAPI to set application properties.static interfaceMessageBuilder.MessageAnnotationsBuilderAPI to set message annotations.static interfaceMessageBuilder.PropertiesBuilderAPI to set message properties.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MessageBuilderaddData(byte[] data)Set binary data of the message.MessageBuilder.ApplicationPropertiesBuilderapplicationProperties()The builder to set application properties.Messagebuild()Create the message.MessageBuilder.MessageAnnotationsBuildermessageAnnotations()The builder to set message annotations.MessageBuilder.PropertiesBuilderproperties()The builder forProperties.MessageBuilderpublishingId(long publishingId)Set the publishing ID (for deduplication).
-
-
-
Method Detail
-
build
Message build()
Create the message.- Returns:
- the message
-
publishingId
MessageBuilder publishingId(long 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:
ProducerBuilder.name(String), Deduplication documentation
-
properties
MessageBuilder.PropertiesBuilder properties()
The builder forProperties.- Returns:
- the properties builder
- See Also:
Message.getProperties()
-
applicationProperties
MessageBuilder.ApplicationPropertiesBuilder applicationProperties()
The builder to set application properties.- Returns:
- the application properties builder
- See Also:
Message.getApplicationProperties()
-
messageAnnotations
MessageBuilder.MessageAnnotationsBuilder messageAnnotations()
The builder to set message annotations.- Returns:
- the message annotations builder
- See Also:
Message.getMessageAnnotations()
-
addData
MessageBuilder addData(byte[] data)
Set binary data of the message.- Parameters:
data-- Returns:
- this builder instance
- See Also:
Message.getBodyAsBinary()
-
-