Class OutgoingRabbitMQMetadata.Builder
- java.lang.Object
-
- io.smallrye.reactive.messaging.rabbitmq.OutgoingRabbitMQMetadata.Builder
-
- Enclosing class:
- OutgoingRabbitMQMetadata
public static class OutgoingRabbitMQMetadata.Builder extends Object
Allows the builder-style construction ofOutgoingRabbitMQMetadata
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OutgoingRabbitMQMetadata
build()
Returns the builtOutgoingRabbitMQMetadata
.OutgoingRabbitMQMetadata.Builder
withAppId(String appId)
Adds an application id property to the metadataOutgoingRabbitMQMetadata.Builder
withClusterId(String clusterId)
Adds a cluster id property to the metadataOutgoingRabbitMQMetadata.Builder
withContentEncoding(String contentEncoding)
Adds a content encoding property to the metadataOutgoingRabbitMQMetadata.Builder
withContentType(String contentType)
Adds a content type property to the metadataOutgoingRabbitMQMetadata.Builder
withCorrelationId(String correlationId)
Adds a correlation id property to the metadataOutgoingRabbitMQMetadata.Builder
withDeliveryMode(Integer deliveryMode)
Adds a delivery mode property to the metadataOutgoingRabbitMQMetadata.Builder
withExpiration(String expiration)
Adds an expiration property to the metadataOutgoingRabbitMQMetadata.Builder
withHeader(String header, Object value)
Adds a message header.OutgoingRabbitMQMetadata.Builder
withMessageId(String messageId)
Adds a message id property to the metadataOutgoingRabbitMQMetadata.Builder
withPriority(Integer priority)
Adds a priority property to the metadataOutgoingRabbitMQMetadata.Builder
withReplyTo(String replyTo)
Adds a reply to property to the metadataOutgoingRabbitMQMetadata.Builder
withRoutingKey(String routingKey)
Adds a routing key property to the metadataOutgoingRabbitMQMetadata.Builder
withTimestamp(ZonedDateTime timestamp)
Adds a timestamp property to the metadataOutgoingRabbitMQMetadata.Builder
withType(String type)
Adds a type property to the metadataOutgoingRabbitMQMetadata.Builder
withUserId(String userId)
Adds a user id property to the metadata
-
-
-
Method Detail
-
withHeader
public OutgoingRabbitMQMetadata.Builder withHeader(String header, Object value)
Adds a message header.- Parameters:
header
- the header namevalue
- the header value- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withAppId
public OutgoingRabbitMQMetadata.Builder withAppId(String appId)
Adds an application id property to the metadata- Parameters:
appId
- the application id- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withContentEncoding
public OutgoingRabbitMQMetadata.Builder withContentEncoding(String contentEncoding)
Adds a content encoding property to the metadata- Parameters:
contentEncoding
- the MIME content encoding- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withClusterId
public OutgoingRabbitMQMetadata.Builder withClusterId(String clusterId)
Adds a cluster id property to the metadata- Parameters:
clusterId
- the cluster id- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withContentType
public OutgoingRabbitMQMetadata.Builder withContentType(String contentType)
Adds a content type property to the metadata- Parameters:
contentType
- the MIME content type- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withCorrelationId
public OutgoingRabbitMQMetadata.Builder withCorrelationId(String correlationId)
Adds a correlation id property to the metadata- Parameters:
correlationId
- the correlation id- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withDeliveryMode
public OutgoingRabbitMQMetadata.Builder withDeliveryMode(Integer deliveryMode)
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
public OutgoingRabbitMQMetadata.Builder withExpiration(String expiration)
Adds an expiration property to the metadata- Parameters:
expiration
- a string-valued representation of a time (ms)- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withMessageId
public OutgoingRabbitMQMetadata.Builder withMessageId(String messageId)
Adds a message id property to the metadata- Parameters:
messageId
- the message id- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withPriority
public OutgoingRabbitMQMetadata.Builder withPriority(Integer priority)
Adds a priority property to the metadata- Parameters:
priority
- the priority (value between 0 and 9 inclusive)- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withReplyTo
public OutgoingRabbitMQMetadata.Builder withReplyTo(String replyTo)
Adds a reply to property to the metadata- Parameters:
replyTo
- the address to reply to the message- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withRoutingKey
public OutgoingRabbitMQMetadata.Builder withRoutingKey(String routingKey)
Adds a routing key property to the metadata- Parameters:
routingKey
- the routing key- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withTimestamp
public OutgoingRabbitMQMetadata.Builder withTimestamp(ZonedDateTime timestamp)
Adds a timestamp property to the metadata- Parameters:
timestamp
- aZonedDateTime
representing the timestamp- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withType
public OutgoingRabbitMQMetadata.Builder withType(String type)
Adds a type property to the metadata- Parameters:
type
- the type- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
withUserId
public OutgoingRabbitMQMetadata.Builder withUserId(String userId)
Adds a user id property to the metadata- Parameters:
userId
- the user id- Returns:
- this
OutgoingRabbitMQMetadata.Builder
-
build
public OutgoingRabbitMQMetadata build()
Returns the builtOutgoingRabbitMQMetadata
.- Returns:
- the outgoing metadata
-
-