public static class ConsumerConfiguration.Builder
extends java.lang.Object
new ConsumerConfiguration.Builder().build() will create a default ConsumerConfiguration.
| Constructor and Description |
|---|
Builder() |
Builder(ConsumerConfiguration cc) |
| Modifier and Type | Method and Description |
|---|---|
ConsumerConfiguration.Builder |
ackPolicy(AckPolicy policy)
Sets the acknowledgement policy of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
ackWait(java.time.Duration timeout)
Sets the acknowledgement wait duration of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
ackWait(long timeoutMillis)
Sets the acknowledgement wait duration of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
backoff(java.time.Duration... backoffs)
Set the list of backoff.
|
ConsumerConfiguration.Builder |
backoff(long... backoffsMillis)
Set the list of backoff.
|
ConsumerConfiguration |
build()
Builds the ConsumerConfiguration
|
PullSubscribeOptions |
buildPullSubscribeOptions()
Builds the PullSubscribeOptions with this configuration
|
PushSubscribeOptions |
buildPushSubscribeOptions()
Builds the PushSubscribeOptions with this configuration
|
ConsumerConfiguration.Builder |
deliverGroup(java.lang.String group)
Sets the group to deliver messages to.
|
ConsumerConfiguration.Builder |
deliverPolicy(DeliverPolicy policy)
Sets the delivery policy of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
deliverSubject(java.lang.String subject)
Sets the subject to deliver messages to.
|
ConsumerConfiguration.Builder |
description(java.lang.String description)
Sets the description
|
ConsumerConfiguration.Builder |
durable(java.lang.String durable)
Sets the name of the durable consumer.
|
ConsumerConfiguration.Builder |
filterSubject(java.lang.String filterSubject)
Sets the filter subject of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
flowControl(java.time.Duration idleHeartbeat)
set the flow control on and set the idle heartbeat
|
ConsumerConfiguration.Builder |
flowControl(long idleHeartbeatMillis)
set the flow control on and set the idle heartbeat
|
ConsumerConfiguration.Builder |
headersOnly(java.lang.Boolean headersOnly)
set the headers only flag saying to deliver only the headers of
messages in the stream and not the bodies
|
ConsumerConfiguration.Builder |
idleHeartbeat(java.time.Duration idleHeartbeat)
sets the idle heart beat wait time
|
ConsumerConfiguration.Builder |
idleHeartbeat(long idleHeartbeatMillis)
sets the idle heart beat wait time
|
ConsumerConfiguration.Builder |
inactiveThreshold(java.time.Duration inactiveThreshold)
sets the amount of time before the consumer is deemed inactive.
|
ConsumerConfiguration.Builder |
inactiveThreshold(long inactiveThreshold)
sets the amount of time before the consumer is deemed inactive.
|
ConsumerConfiguration.Builder |
maxAckPending(long maxAckPending)
Sets the maximum ack pending.
|
ConsumerConfiguration.Builder |
maxAckPending(java.lang.Long maxAckPending)
Sets the maximum ack pending or null to unset / clear.
|
ConsumerConfiguration.Builder |
maxBatch(long maxBatch)
sets the max batch size for the server to allow on pull requests.
|
ConsumerConfiguration.Builder |
maxBatch(java.lang.Long maxBatch)
sets the max batch size for the server to allow on pull requests.
|
ConsumerConfiguration.Builder |
maxBytes(long maxBytes)
sets the max bytes size for the server to allow on pull requests.
|
ConsumerConfiguration.Builder |
maxBytes(java.lang.Long maxBytes)
sets the max bytes size for the server to allow on pull requests.
|
ConsumerConfiguration.Builder |
maxDeliver(long maxDeliver)
Sets the maximum delivery amount of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
maxDeliver(java.lang.Long maxDeliver)
Sets the maximum delivery amount of the ConsumerConfiguration or null to unset / clear.
|
ConsumerConfiguration.Builder |
maxExpires(java.time.Duration maxExpires)
sets the max amount of expire time for the server to allow on pull requests.
|
ConsumerConfiguration.Builder |
maxExpires(long maxExpires)
sets the max amount of expire time for the server to allow on pull requests.
|
ConsumerConfiguration.Builder |
maxPullWaiting(long maxPullWaiting)
sets the max pull waiting, the number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored.
|
ConsumerConfiguration.Builder |
maxPullWaiting(java.lang.Long maxPullWaiting)
sets the max pull waiting, the number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored.
|
ConsumerConfiguration.Builder |
memStorage(java.lang.Boolean memStorage)
set the mem storage flag to force the consumer state to be kept
in memory rather than inherit the setting from the stream
|
ConsumerConfiguration.Builder |
name(java.lang.String name)
Sets the name of the consumer.
|
ConsumerConfiguration.Builder |
numReplicas(java.lang.Integer numReplicas)
set the number of replicas for the consumer.
|
ConsumerConfiguration.Builder |
rateLimit(long bitsPerSecond)
Set the rate limit of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
rateLimit(java.lang.Long bitsPerSecond)
Set the rate limit of the ConsumerConfiguration or null to unset / clear.
|
ConsumerConfiguration.Builder |
replayPolicy(ReplayPolicy policy)
Sets the replay policy of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
sampleFrequency(java.lang.String frequency)
Sets the sample frequency of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
startSequence(long sequence)
Sets the start sequence of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
startSequence(java.lang.Long sequence)
Sets the start sequence of the ConsumerConfiguration or null to unset / clear.
|
ConsumerConfiguration.Builder |
startTime(java.time.ZonedDateTime startTime)
Sets the start time of the ConsumerConfiguration.
|
public Builder()
public Builder(ConsumerConfiguration cc)
public ConsumerConfiguration.Builder description(java.lang.String description)
description - the descriptionpublic ConsumerConfiguration.Builder durable(java.lang.String durable)
durable - name of the durable consumer.public ConsumerConfiguration.Builder name(java.lang.String name)
name - name of the consumer.public ConsumerConfiguration.Builder deliverPolicy(DeliverPolicy policy)
policy - the delivery policy.public ConsumerConfiguration.Builder deliverSubject(java.lang.String subject)
subject - the subject.public ConsumerConfiguration.Builder deliverGroup(java.lang.String group)
group - the delivery group.public ConsumerConfiguration.Builder startSequence(java.lang.Long sequence)
sequence - the start sequencepublic ConsumerConfiguration.Builder startSequence(long sequence)
sequence - the start sequencepublic ConsumerConfiguration.Builder startTime(java.time.ZonedDateTime startTime)
startTime - the start timepublic ConsumerConfiguration.Builder ackPolicy(AckPolicy policy)
policy - the acknowledgement policy.public ConsumerConfiguration.Builder ackWait(java.time.Duration timeout)
timeout - the wait timeoutpublic ConsumerConfiguration.Builder ackWait(long timeoutMillis)
timeoutMillis - the wait timeout in millisecondspublic ConsumerConfiguration.Builder maxDeliver(java.lang.Long maxDeliver)
maxDeliver - the maximum delivery amountpublic ConsumerConfiguration.Builder maxDeliver(long maxDeliver)
maxDeliver - the maximum delivery amountpublic ConsumerConfiguration.Builder filterSubject(java.lang.String filterSubject)
filterSubject - the filter subjectpublic ConsumerConfiguration.Builder replayPolicy(ReplayPolicy policy)
policy - the replay policy.public ConsumerConfiguration.Builder sampleFrequency(java.lang.String frequency)
frequency - the frequencypublic ConsumerConfiguration.Builder rateLimit(java.lang.Long bitsPerSecond)
bitsPerSecond - bits per second to deliverpublic ConsumerConfiguration.Builder rateLimit(long bitsPerSecond)
bitsPerSecond - bits per second to deliverpublic ConsumerConfiguration.Builder maxAckPending(java.lang.Long maxAckPending)
maxAckPending - maximum pending acknowledgements.public ConsumerConfiguration.Builder maxAckPending(long maxAckPending)
maxAckPending - maximum pending acknowledgements.public ConsumerConfiguration.Builder idleHeartbeat(java.time.Duration idleHeartbeat)
idleHeartbeat - the idle heart beat durationpublic ConsumerConfiguration.Builder idleHeartbeat(long idleHeartbeatMillis)
idleHeartbeatMillis - the idle heart beat duration in millisecondspublic ConsumerConfiguration.Builder flowControl(java.time.Duration idleHeartbeat)
idleHeartbeat - the idle heart beat durationpublic ConsumerConfiguration.Builder flowControl(long idleHeartbeatMillis)
idleHeartbeatMillis - the idle heart beat duration in millisecondspublic ConsumerConfiguration.Builder maxExpires(java.time.Duration maxExpires)
maxExpires - the max expire durationpublic ConsumerConfiguration.Builder maxExpires(long maxExpires)
maxExpires - the max expire duration in millisecondspublic ConsumerConfiguration.Builder inactiveThreshold(java.time.Duration inactiveThreshold)
inactiveThreshold - the threshold durationpublic ConsumerConfiguration.Builder inactiveThreshold(long inactiveThreshold)
inactiveThreshold - the threshold duration in millisecondspublic ConsumerConfiguration.Builder maxPullWaiting(java.lang.Long maxPullWaiting)
maxPullWaiting - the max pull waitingpublic ConsumerConfiguration.Builder maxPullWaiting(long maxPullWaiting)
maxPullWaiting - the max pull waitingpublic ConsumerConfiguration.Builder maxBatch(java.lang.Long maxBatch)
maxBatch - the max batch sizepublic ConsumerConfiguration.Builder maxBatch(long maxBatch)
maxBatch - the max batch sizepublic ConsumerConfiguration.Builder maxBytes(java.lang.Long maxBytes)
maxBytes - the max bytes sizepublic ConsumerConfiguration.Builder maxBytes(long maxBytes)
maxBytes - the max bytes sizepublic ConsumerConfiguration.Builder numReplicas(java.lang.Integer numReplicas)
numReplicas - number of replicas for the consumerpublic ConsumerConfiguration.Builder headersOnly(java.lang.Boolean headersOnly)
headersOnly - the flagpublic ConsumerConfiguration.Builder memStorage(java.lang.Boolean memStorage)
memStorage - the flagpublic ConsumerConfiguration.Builder backoff(java.time.Duration... backoffs)
backoffs - zero or more backoff durations or an array of backoffspublic ConsumerConfiguration.Builder backoff(long... backoffsMillis)
backoffsMillis - zero or more backoff in millis or an array of backoffsMillispublic ConsumerConfiguration build()
public PushSubscribeOptions buildPushSubscribeOptions()
public PullSubscribeOptions buildPullSubscribeOptions()