public static class BatchPublishOptions.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder()
Constructs a new publish options Builder with the default values.
|
| Modifier and Type | Method and Description |
|---|---|
BatchPublishOptions.Builder |
ackEvery(int ackEvery)
The interval to ack when adding a message, after the first message.
|
BatchPublishOptions.Builder |
ackFirst(boolean ackFirst)
Whether to ack the first message.
|
BatchPublishOptions.Builder |
ackTimeout(java.time.Duration ackTimeout)
Sets the timeout to wait for the acknowledgement for acks when adding or the commit.
|
BatchPublishOptions.Builder |
ackTimeout(long ackTimeoutMillis)
Sets the timeout im milliseconds to wait for the acknowledgement for acks when adding or the commit.
|
BatchPublishOptions |
build()
Builds the publish options.
|
BatchPublishOptions.Builder |
clearExpected()
Clears the expected so the build can be re-used.
|
BatchPublishOptions.Builder |
expectedLastSequence(long sequence)
Sets the expected message sequence of the publish
|
BatchPublishOptions.Builder |
expectedLastSubjectSequence(long sequence)
Sets the expected subject message sequence of the publish
|
BatchPublishOptions.Builder |
expectedLastSubjectSequenceSubject(java.lang.String expectedLastSubSeqSubject)
Sets the filter subject for the expected last subject sequence
This can be used for a wildcard since it is used
in place of the message subject along with expectedLastSubjectSequence
|
BatchPublishOptions.Builder |
expectedStream(java.lang.String stream)
Sets the expected stream for the publish.
|
BatchPublishOptions.Builder |
messageTtl(io.nats.client.MessageTtl messageTtl)
Sets the TTL for this specific message to be published
|
BatchPublishOptions.Builder |
messageTtlCustom(java.lang.String msgTtlCustom)
Sets the TTL for this specific message to be published.
|
BatchPublishOptions.Builder |
messageTtlNever()
Sets the TTL for this specific message to be published and never be expired
|
BatchPublishOptions.Builder |
messageTtlSeconds(int msgTtlSeconds)
Sets the TTL for this specific message to be published.
|
public Builder()
public BatchPublishOptions.Builder ackTimeout(java.time.Duration ackTimeout)
ackTimeout - the ack timeout.public BatchPublishOptions.Builder ackTimeout(long ackTimeoutMillis)
ackTimeoutMillis - the ack timeout.public BatchPublishOptions.Builder ackFirst(boolean ackFirst)
ackFirst - the flagpublic BatchPublishOptions.Builder ackEvery(int ackEvery)
ackEvery - the ack every valuepublic BatchPublishOptions.Builder expectedStream(java.lang.String stream)
stream - expected streampublic BatchPublishOptions.Builder expectedLastSequence(long sequence)
sequence - the expected last sequence numberpublic BatchPublishOptions.Builder expectedLastSubjectSequence(long sequence)
sequence - the expected last subject sequence numberpublic BatchPublishOptions.Builder expectedLastSubjectSequenceSubject(java.lang.String expectedLastSubSeqSubject)
expectedLastSubSeqSubject - the filter subjectpublic BatchPublishOptions.Builder messageTtlSeconds(int msgTtlSeconds)
msgTtlSeconds - the ttl in secondspublic BatchPublishOptions.Builder messageTtlCustom(java.lang.String msgTtlCustom)
msgTtlCustom - the custom ttl stringpublic BatchPublishOptions.Builder messageTtlNever()
public BatchPublishOptions.Builder messageTtl(io.nats.client.MessageTtl messageTtl)
messageTtl - the message ttl instancepublic BatchPublishOptions.Builder clearExpected()
public BatchPublishOptions build()