Package com.rabbitmq.stream.codec
Class WrapperMessageBuilder
- java.lang.Object
-
- com.rabbitmq.stream.codec.WrapperMessageBuilder
-
- All Implemented Interfaces:
MessageBuilder
public class WrapperMessageBuilder extends Object implements MessageBuilder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.rabbitmq.stream.MessageBuilder
MessageBuilder.ApplicationPropertiesBuilder, MessageBuilder.MessageAnnotationsBuilder, MessageBuilder.PropertiesBuilder
-
-
Constructor Summary
Constructors Constructor Description WrapperMessageBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageBuilder
addData(byte[] data)
Set binary data of the message.MessageBuilder.ApplicationPropertiesBuilder
applicationProperties()
The builder to set application properties.Message
build()
Create the message.MessageBuilder.MessageAnnotationsBuilder
messageAnnotations()
The builder to set message annotations.MessageBuilder.PropertiesBuilder
properties()
The builder forProperties
.MessageBuilder
publishingId(long publishingId)
Set the publishing ID (for deduplication).
-
-
-
Method Detail
-
build
public Message build()
Description copied from interface:MessageBuilder
Create the message.- Specified by:
build
in interfaceMessageBuilder
- Returns:
- the message
-
publishingId
public MessageBuilder publishingId(long publishingId)
Description copied from interface:MessageBuilder
Set the publishing ID (for deduplication).This is value is used only for outbound messages and is not persisted.
- Specified by:
publishingId
in interfaceMessageBuilder
- Returns:
- this builder instance
- See Also:
ProducerBuilder.name(String)
, Deduplication documentation
-
properties
public MessageBuilder.PropertiesBuilder properties()
Description copied from interface:MessageBuilder
The builder forProperties
.- Specified by:
properties
in interfaceMessageBuilder
- Returns:
- the properties builder
- See Also:
Message.getProperties()
-
applicationProperties
public MessageBuilder.ApplicationPropertiesBuilder applicationProperties()
Description copied from interface:MessageBuilder
The builder to set application properties.- Specified by:
applicationProperties
in interfaceMessageBuilder
- Returns:
- the application properties builder
- See Also:
Message.getApplicationProperties()
-
messageAnnotations
public MessageBuilder.MessageAnnotationsBuilder messageAnnotations()
Description copied from interface:MessageBuilder
The builder to set message annotations.- Specified by:
messageAnnotations
in interfaceMessageBuilder
- Returns:
- the message annotations builder
- See Also:
Message.getMessageAnnotations()
-
addData
public MessageBuilder addData(byte[] data)
Description copied from interface:MessageBuilder
Set binary data of the message.- Specified by:
addData
in interfaceMessageBuilder
- Returns:
- this builder instance
- See Also:
Message.getBodyAsBinary()
-
-