public static class BatchPublisher.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
BatchPublisher.Builder |
ackEvery(int ackEvery)
The interval to ack when adding a message, after the first message.
|
BatchPublisher.Builder |
ackFirst(boolean ackFirst)
Whether to ack the first message.
|
BatchPublisher.Builder |
ackTimeout(java.time.Duration ackTimeout)
Sets the timeout to wait for the acknowledgement for acks when adding or the commit.
|
BatchPublisher.Builder |
ackTimeout(long ackTimeoutMillis)
Sets the timeout im milliseconds to wait for the acknowledgement for acks when adding or the commit.
|
BatchPublisher.Builder |
batchId(java.lang.String batchId) |
BatchPublisher |
build() |
BatchPublisher.Builder |
connection(io.nats.client.Connection conn) |
BatchPublisher.Builder |
messageTtl(io.nats.client.MessageTtl messageTtl)
Sets the TTL for this specific message to be published
|
BatchPublisher.Builder |
messageTtlCustom(java.lang.String msgTtlCustom)
Sets the TTL for this specific message to be published.
|
BatchPublisher.Builder |
messageTtlNever()
Sets the TTL for this specific message to be published and never be expired
|
BatchPublisher.Builder |
messageTtlSeconds(int msgTtlSeconds)
Sets the TTL for this specific message to be published.
|
public BatchPublisher.Builder connection(io.nats.client.Connection conn)
public BatchPublisher.Builder batchId(java.lang.String batchId)
public BatchPublisher.Builder ackTimeout(java.time.Duration ackTimeout)
ackTimeout - the ack timeout.public BatchPublisher.Builder ackTimeout(long ackTimeoutMillis)
ackTimeoutMillis - the ack timeout.public BatchPublisher.Builder ackFirst(boolean ackFirst)
ackFirst - the flagpublic BatchPublisher.Builder ackEvery(int ackEvery)
ackEvery - the ack every valuepublic BatchPublisher.Builder messageTtlSeconds(int msgTtlSeconds)
msgTtlSeconds - the ttl in secondspublic BatchPublisher.Builder messageTtlCustom(java.lang.String msgTtlCustom)
msgTtlCustom - the custom ttl stringpublic BatchPublisher.Builder messageTtlNever()
public BatchPublisher.Builder messageTtl(io.nats.client.MessageTtl messageTtl)
messageTtl - the message ttl instancepublic BatchPublisher build()