public class SubscriptionOptions
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SubscriptionOptions.Builder
A Builder implementation for creating an immutable
SubscriptionOptions object. |
Modifier and Type | Field and Description |
---|---|
static java.time.Duration |
DEFAULT_ACK_WAIT
Default ack wait time for a subscriptions.
|
static int |
DEFAULT_MAX_IN_FLIGHT
Default max messages in flight for a subscriptions.
|
static java.time.Duration |
DEFAULT_SUBSCRIPTION_TIMEOUT
Default time a connection will wait to create a subscription.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.time.Duration |
getAckWait()
Returns the timeout for waiting for an ACK from the cluster's point of view for delivered
messages.
|
java.lang.String |
getDispatcherName()
Returns name of the dispatcher to use for this subscription.
|
java.lang.String |
getDurableName()
Returns the name of the durable subscriber.
|
int |
getMaxInFlight()
Returns the maximum number of messages the cluster will send without an ACK.
|
io.nats.streaming.protobuf.StartPosition |
getStartAt()
Returns the desired start position for the message stream.
|
long |
getStartSequence()
Returns the desired start sequence position.
|
java.time.Instant |
getStartTime()
Returns the desired start time position.
|
long |
getStartTime(java.util.concurrent.TimeUnit unit)
Returns the desired start time position in the requested units.
|
java.time.Duration |
getSubscriptionTimeout() |
int |
hashCode() |
boolean |
isManualAcks()
Returns whether or not messages for this subscription must be acknowledged individually by
calling
Message.ack() . |
java.lang.String |
toString() |
public static final java.time.Duration DEFAULT_ACK_WAIT
public static final int DEFAULT_MAX_IN_FLIGHT
public static final java.time.Duration DEFAULT_SUBSCRIPTION_TIMEOUT
public java.time.Duration getSubscriptionTimeout()
public java.lang.String getDurableName()
public int getMaxInFlight()
public java.time.Duration getAckWait()
public io.nats.streaming.protobuf.StartPosition getStartAt()
public long getStartSequence()
public java.time.Instant getStartTime()
public long getStartTime(java.util.concurrent.TimeUnit unit)
unit
- the unit of timepublic boolean isManualAcks()
Message.ack()
.public java.lang.String getDispatcherName()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object