Package com.rabbitmq.stream
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
Modifier and TypeInterfaceDescriptionstatic interface
API to set application properties.static interface
API to set message annotations.static interface
API 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 de-duplication).
-
Method Details
-
build
Message build()Create the message.- Returns:
- the message
-
publishingId
Set the publishing ID (for de-duplication).This is value is used only for outbound messages and is not persisted.
- Parameters:
publishingId
-- Returns:
- this builder instance
-
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:
-