Class OutgoingRabbitMQMetadata.Builder
java.lang.Object
io.smallrye.reactive.messaging.rabbitmq.OutgoingRabbitMQMetadata.Builder
- Enclosing class:
- OutgoingRabbitMQMetadata
Allows the builder-style construction of
OutgoingRabbitMQMetadata-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the builtOutgoingRabbitMQMetadata.Adds an application id property to the metadatawithClusterId(String clusterId) Adds a cluster id property to the metadatawithContentEncoding(String contentEncoding) Adds a content encoding property to the metadatawithContentType(String contentType) Adds a content type property to the metadatawithCorrelationId(String correlationId) Adds a correlation id property to the metadatawithDeliveryMode(Integer deliveryMode) Adds a delivery mode property to the metadatawithExpiration(String expiration) Adds an expiration property to the metadatawithHeader(String header, Object value) Adds a message header.withHeaders(Map<String, Object> header) Adds the message headers to the metadata.withMessageId(String messageId) Adds a message id property to the metadatawithPriority(Integer priority) Adds a priority property to the metadatawithReplyTo(String replyTo) Adds a reply to property to the metadatawithRoutingKey(String routingKey) Adds a routing key property to the metadatawithTimestamp(ZonedDateTime timestamp) Adds a timestamp property to the metadataAdds a type property to the metadatawithUserId(String userId) Adds a user id property to the metadata
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withHeader
Adds a message header.- Parameters:
header- the header namevalue- the header value- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withHeaders
Adds the message headers to the metadata.- Parameters:
header- the message headers- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withAppId
Adds an application id property to the metadata- Parameters:
appId- the application id- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withContentEncoding
Adds a content encoding property to the metadata- Parameters:
contentEncoding- the MIME content encoding- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withClusterId
Adds a cluster id property to the metadata- Parameters:
clusterId- the cluster id- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withContentType
Adds a content type property to the metadata- Parameters:
contentType- the MIME content type- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withCorrelationId
Adds a correlation id property to the metadata- Parameters:
correlationId- the correlation id- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withDeliveryMode
Adds a delivery mode property to the metadata- Parameters:
deliveryMode- the delivery mode; use 1 for non-persistent and 2 for persistent- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withExpiration
Adds an expiration property to the metadata- Parameters:
expiration- a string-valued representation of a time (ms)- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withMessageId
Adds a message id property to the metadata- Parameters:
messageId- the message id- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withPriority
Adds a priority property to the metadata- Parameters:
priority- the priority (value between 0 and 9 inclusive)- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withReplyTo
Adds a reply to property to the metadata- Parameters:
replyTo- the address to reply to the message- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withRoutingKey
Adds a routing key property to the metadata- Parameters:
routingKey- the routing key- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withTimestamp
Adds a timestamp property to the metadata- Parameters:
timestamp- aZonedDateTimerepresenting the timestamp- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withType
Adds a type property to the metadata- Parameters:
type- the type- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withUserId
Adds a user id property to the metadata- Parameters:
userId- the user id- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
build
Returns the builtOutgoingRabbitMQMetadata.- Returns:
- the outgoing metadata
-