Package org.acemq.amqp.transport
Class OutboundMessage.Builder
java.lang.Object
org.acemq.amqp.transport.OutboundMessage.Builder
- Enclosing class:
OutboundMessage
Builds
OutboundMessage instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAllows the broker to drop the message when nothing is bound to receive it.Confirms this publish and checks it for a return even on a connection made without publisher confirms.body(byte[] body) build()contentType(@Nullable String contentType) expiration(@Nullable Duration expiration) Asks the broker to discard the message if it is still undelivered after this long.Sets the priority this message is published with.Names the queue a reply should be sent to.routingKey(String routingKey) Marks the message transient, so a broker restart may lose it.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
exchange
-
routingKey
-
body
-
header
-
headers
-
messageId
-
contentType
-
transientDelivery
Marks the message transient, so a broker restart may lose it. -
allowUnroutable
Allows the broker to drop the message when nothing is bound to receive it. -
expiration
Asks the broker to discard the message if it is still undelivered after this long.- Parameters:
expiration- positive time-to-live, or null for none
-
priority
Sets the priority this message is published with.Only meaningful on a queue declared with a maximum priority; elsewhere the broker ignores it. Higher is more urgent.
- Parameters:
priority- priority to publish with, ornullfor none- Returns:
- this builder
-
replyTo
Names the queue a reply should be sent to.Carried as AMQP's own
reply-toproperty rather than an AceMQ header, so a service written against this library can answer a caller that was not.- Parameters:
replyTo- queue to reply to, ornullfor a message expecting no reply- Returns:
- this builder
-
alwaysConfirmed
Confirms this publish and checks it for a return even on a connection made without publisher confirms.- Returns:
- this builder
- See Also:
-
build
-