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 |
build()
Builds the ConsumerConfiguration
|
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 |
durable(java.lang.String durable)
Sets the name of the durable subscription.
|
ConsumerConfiguration.Builder |
filterSubject(java.lang.String filterSubject)
Sets the filter subject of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
flowControl(boolean flowControl)
set the flow control mode
|
AckPolicy |
getAckPolicy() |
java.lang.String |
getDeliverSubject() |
java.lang.String |
getDurable() |
long |
getMaxAckPending() |
ConsumerConfiguration.Builder |
idleHeartbeat(java.time.Duration idleHeartbeat)
sets the idle heart beat wait time
|
ConsumerConfiguration.Builder |
maxAckPending(long maxAckPending)
Sets the maximum ack pending.
|
ConsumerConfiguration.Builder |
maxDeliver(long maxDeliver)
Sets the maximum delivery amount of the ConsumerConfiguration.
|
ConsumerConfiguration.Builder |
rateLimit(int msgsPerSecond)
Set the rate limit of the ConsumerConfiguration.
|
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 |
startTime(java.time.ZonedDateTime startTime)
Sets the start time of the ConsumerConfiguration.
|
public Builder()
public Builder(ConsumerConfiguration cc)
public java.lang.String getDurable()
public java.lang.String getDeliverSubject()
public long getMaxAckPending()
public AckPolicy getAckPolicy()
public ConsumerConfiguration.Builder durable(java.lang.String durable)
durable
- name of the durable subscription.public ConsumerConfiguration.Builder deliverPolicy(DeliverPolicy policy)
policy
- the delivery policy.public ConsumerConfiguration.Builder deliverSubject(java.lang.String subject)
subject
- the delivery subject.public 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 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(int msgsPerSecond)
msgsPerSecond
- messages per second to deliverpublic 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 flowControl(boolean flowControl)
flowControl
- the flow control mode flagpublic ConsumerConfiguration build()