public class OrderedConsumerConfiguration
extends java.lang.Object
implements io.nats.client.support.JsonSerializable
| Constructor and Description |
|---|
OrderedConsumerConfiguration()
OrderedConsumerConfiguration creation works like a builder.
|
OrderedConsumerConfiguration(@NonNull io.nats.client.support.JsonValue jv)
OrderedConsumerConfiguration creation works like a builder.
|
OrderedConsumerConfiguration(@NonNull java.lang.String json)
OrderedConsumerConfiguration creation works like a builder.
|
| Modifier and Type | Method and Description |
|---|---|
OrderedConsumerConfiguration |
consumerNamePrefix(java.lang.String consumerNamePrefix)
Sets the consumer name prefix for consumers created by this configuration.
|
OrderedConsumerConfiguration |
deliverPolicy(DeliverPolicy deliverPolicy)
Sets the delivery policy of the OrderedConsumerConfiguration.
|
OrderedConsumerConfiguration |
filterSubject(java.lang.String filterSubject)
Sets the filter subject of the OrderedConsumerConfiguration.
|
OrderedConsumerConfiguration |
filterSubjects(java.util.List<java.lang.String> filterSubjects)
Sets the filter subject of the OrderedConsumerConfiguration.
|
OrderedConsumerConfiguration |
filterSubjects(java.lang.String... filterSubjects)
Sets the filter subjects of the OrderedConsumerConfiguration.
|
java.lang.String |
getConsumerNamePrefix()
Gets the prefix that will be used for names of underlying consumers
|
@Nullable DeliverPolicy |
getDeliverPolicy()
Gets the deliver policy of this consumer configuration.
|
@Nullable java.lang.String |
getFilterSubject()
Gets the filter subject of this consumer configuration.
|
@NonNull java.util.List<java.lang.String> |
getFilterSubjects()
Gets the filter subjects as a list.
|
@Nullable java.lang.Boolean |
getHeadersOnly()
Get the header only flag indicating whether it's on or off.
|
@Nullable ReplayPolicy |
getReplayPolicy()
Gets the replay policy of this consumer configuration.
|
@Nullable java.lang.Long |
getStartSequence()
Gets the start sequence of this consumer configuration.
|
@Nullable java.time.ZonedDateTime |
getStartTime()
Gets the start time of this consumer configuration.
|
boolean |
hasMultipleFilterSubjects()
Whether there are multiple filter subjects for this consumer configuration.
|
OrderedConsumerConfiguration |
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
|
boolean |
isHeadersOnly()
Get the header only flag indicating whether it's on or off.
|
OrderedConsumerConfiguration |
replayPolicy(ReplayPolicy replayPolicy)
Sets the replay policy of the OrderedConsumerConfiguration.
|
OrderedConsumerConfiguration |
startSequence(long startSequence)
Sets the start sequence of the OrderedConsumerConfiguration.
|
OrderedConsumerConfiguration |
startTime(java.time.ZonedDateTime startTime)
Sets the start time of the OrderedConsumerConfiguration.
|
@NonNull java.lang.String |
toJson()
Returns a JSON representation of this ordered consumer configuration.
|
public OrderedConsumerConfiguration()
public OrderedConsumerConfiguration(@NonNull java.lang.String json)
throws io.nats.client.support.JsonParseException
json - the JSON used to seed the builderio.nats.client.support.JsonParseException - if there is a problem parsing the jsonpublic OrderedConsumerConfiguration(@NonNull io.nats.client.support.JsonValue jv)
throws io.nats.client.support.JsonParseException
jv - the JsonValue used to seed the builderio.nats.client.support.JsonParseException - if there is a problem parsing the jsonpublic @NonNull java.lang.String toJson()
toJson in interface io.nats.client.support.JsonSerializablepublic OrderedConsumerConfiguration filterSubject(java.lang.String filterSubject)
filterSubject - the filter subjectpublic OrderedConsumerConfiguration filterSubjects(java.lang.String... filterSubjects)
filterSubjects - the filter subjectpublic OrderedConsumerConfiguration filterSubjects(java.util.List<java.lang.String> filterSubjects)
filterSubjects - one or more filter subjectspublic OrderedConsumerConfiguration deliverPolicy(DeliverPolicy deliverPolicy)
deliverPolicy - the delivery policy.public OrderedConsumerConfiguration startSequence(long startSequence)
startSequence - the start sequencepublic OrderedConsumerConfiguration startTime(java.time.ZonedDateTime startTime)
startTime - the start timepublic OrderedConsumerConfiguration replayPolicy(ReplayPolicy replayPolicy)
replayPolicy - the replay policy.public OrderedConsumerConfiguration headersOnly(java.lang.Boolean headersOnly)
headersOnly - the flagpublic OrderedConsumerConfiguration consumerNamePrefix(java.lang.String consumerNamePrefix)
consumerNamePrefix - the prefix or null to clear.public @Nullable java.lang.String getFilterSubject()
public @NonNull java.util.List<java.lang.String> getFilterSubjects()
public boolean hasMultipleFilterSubjects()
public @Nullable DeliverPolicy getDeliverPolicy()
public @Nullable java.lang.Long getStartSequence()
public @Nullable java.time.ZonedDateTime getStartTime()
public @Nullable ReplayPolicy getReplayPolicy()
public @Nullable java.lang.Boolean getHeadersOnly()
public boolean isHeadersOnly()
public java.lang.String getConsumerNamePrefix()