public interface MessageBuilder
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.
Message| Modifier and Type | Interface and Description |
|---|---|
static interface |
MessageBuilder.ApplicationPropertiesBuilder
API to set application properties.
|
static interface |
MessageBuilder.MessageAnnotationsBuilder
API to set message annotations.
|
static interface |
MessageBuilder.PropertiesBuilder
API to set message properties.
|
| Modifier and Type | Method and 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 for
Properties. |
MessageBuilder |
publishingId(long publishingId)
Set the publishing ID (for de-duplication).
|
Message build()
MessageBuilder publishingId(long publishingId)
This is value is used only for outbound messages and is not persisted.
publishingId - MessageBuilder.PropertiesBuilder properties()
Properties.Message.getProperties()MessageBuilder.ApplicationPropertiesBuilder applicationProperties()
Message.getApplicationProperties()MessageBuilder.MessageAnnotationsBuilder messageAnnotations()
Message.getMessageAnnotations()MessageBuilder addData(byte[] data)
data - Message.getBodyAsBinary()Copyright © 2022 VMware, Inc. or its affiliates.. All rights reserved.