Class JetStreamConfigBuilder
-
- All Implemented Interfaces:
public final class JetStreamConfigBuilderBuilder for JetStream configuration
-
-
Field Summary
Fields Modifier and Type Field Description private Stringdomainprivate DurationrequestTimeoutprivate StringapiPrefixprivate RetentionPolicydefaultRetentionPolicyprivate StorageTypedefaultStorageTypeprivate IntegerdefaultReplicasprivate DurationdefaultAckWaitprivate IntegerdefaultMaxDeliverprivate ReplayPolicydefaultReplayPolicy
-
Constructor Summary
Constructors Constructor Description JetStreamConfigBuilder()
-
Method Summary
Modifier and Type Method Description final StringgetDomain()JetStream domain name for multi-tenancy final UnitsetDomain(String value)JetStream domain name for multi-tenancy final DurationgetRequestTimeout()How long a JetStream API call waits for the server, including a publish waiting for its ackA publish is awaited against this deadline, but the future jnats actually uses is cleaned up on eu.vstoyanov.natsy.KlientConfigBuilder.requestCleanupInterval. final UnitsetRequestTimeout(Duration value)How long a JetStream API call waits for the server, including a publish waiting for its ackA publish is awaited against this deadline, but the future jnats actually uses is cleaned up on eu.vstoyanov.natsy.KlientConfigBuilder.requestCleanupInterval. final StringgetApiPrefix()Non-default JetStream API subject prefix, as JetStreamOptions.prefixThis is the subject every JetStream API call is addressed to, which is how a client reaches JetStream in another account.final UnitsetApiPrefix(String value)Non-default JetStream API subject prefix, as JetStreamOptions.prefixThis is the subject every JetStream API call is addressed to, which is how a client reaches JetStream in another account.final RetentionPolicygetDefaultRetentionPolicy()Default retention policy for streams final UnitsetDefaultRetentionPolicy(RetentionPolicy value)Default retention policy for streams final StorageTypegetDefaultStorageType()Default storage type for streams final UnitsetDefaultStorageType(StorageType value)Default storage type for streams final IntegergetDefaultReplicas()Default number of replicas for streams final UnitsetDefaultReplicas(Integer value)Default number of replicas for streams final DurationgetDefaultAckWait()Default acknowledgment wait time for consumers final UnitsetDefaultAckWait(Duration value)Default acknowledgment wait time for consumers final IntegergetDefaultMaxDeliver()Default maximum delivery attempts (-1 for unlimited) final UnitsetDefaultMaxDeliver(Integer value)Default maximum delivery attempts (-1 for unlimited) final ReplayPolicygetDefaultReplayPolicy()Default replay policy for consumers final UnitsetDefaultReplayPolicy(ReplayPolicy value)Default replay policy for consumers -
-
Method Detail
-
getRequestTimeout
final Duration getRequestTimeout()
How long a JetStream API call waits for the server, including a publish waiting for its ack
A publish is awaited against this deadline, but the future jnats actually uses is cleaned up on eu.vstoyanov.natsy.KlientConfigBuilder.requestCleanupInterval. natsy raises that interval to cover this timeout so the two agree.
-
setRequestTimeout
final Unit setRequestTimeout(Duration value)
How long a JetStream API call waits for the server, including a publish waiting for its ack
A publish is awaited against this deadline, but the future jnats actually uses is cleaned up on eu.vstoyanov.natsy.KlientConfigBuilder.requestCleanupInterval. natsy raises that interval to cover this timeout so the two agree.
-
getApiPrefix
final String getApiPrefix()
Non-default JetStream API subject prefix, as
JetStreamOptions.prefixThis is the subject every JetStream API call is addressed to, which is how a client reaches JetStream in another account. Set it only when the server expects one - pointing it at a prefix nothing serves leaves every API call unanswered.
-
setApiPrefix
final Unit setApiPrefix(String value)
Non-default JetStream API subject prefix, as
JetStreamOptions.prefixThis is the subject every JetStream API call is addressed to, which is how a client reaches JetStream in another account. Set it only when the server expects one - pointing it at a prefix nothing serves leaves every API call unanswered.
-
getDefaultRetentionPolicy
final RetentionPolicy getDefaultRetentionPolicy()
Default retention policy for streams
-
setDefaultRetentionPolicy
final Unit setDefaultRetentionPolicy(RetentionPolicy value)
Default retention policy for streams
-
getDefaultStorageType
final StorageType getDefaultStorageType()
Default storage type for streams
-
setDefaultStorageType
final Unit setDefaultStorageType(StorageType value)
Default storage type for streams
-
getDefaultReplicas
final Integer getDefaultReplicas()
Default number of replicas for streams
-
setDefaultReplicas
final Unit setDefaultReplicas(Integer value)
Default number of replicas for streams
-
getDefaultAckWait
final Duration getDefaultAckWait()
Default acknowledgment wait time for consumers
-
setDefaultAckWait
final Unit setDefaultAckWait(Duration value)
Default acknowledgment wait time for consumers
-
getDefaultMaxDeliver
final Integer getDefaultMaxDeliver()
Default maximum delivery attempts (-1 for unlimited)
-
setDefaultMaxDeliver
final Unit setDefaultMaxDeliver(Integer value)
Default maximum delivery attempts (-1 for unlimited)
-
getDefaultReplayPolicy
final ReplayPolicy getDefaultReplayPolicy()
Default replay policy for consumers
-
setDefaultReplayPolicy
final Unit setDefaultReplayPolicy(ReplayPolicy value)
Default replay policy for consumers
-
-
-
-