Class StreamConfigBuilder
-
- All Implemented Interfaces:
public final class StreamConfigBuilderBuilder for JetStream stream configuration
-
-
Field Summary
Fields Modifier and Type Field Description private List<String>subjectsprivate RetentionPolicyretentionPolicyprivate IntegermaxConsumersprivate LongmaxMessagesprivate LongmaxBytesprivate DurationmaxAgeprivate IntegermaxMsgSizeprivate StorageTypestorageTypeprivate Integerreplicasprivate BooleannoAckprivate DurationduplicateWindowprivate DiscardPolicydiscardPolicyprivate Stringdescriptionprivate LongmaxMessagesPerSubject
-
Constructor Summary
Constructors Constructor Description StreamConfigBuilder()
-
Method Summary
Modifier and Type Method Description final List<String>getSubjects()List of subjects this stream listens to Supports wildcards (e.g., "orders.*", "payments.>") final UnitsetSubjects(List<String> <set-?>)List of subjects this stream listens to Supports wildcards (e.g., "orders.*", "payments.>") final RetentionPolicygetRetentionPolicy()Retention policy for the stream final UnitsetRetentionPolicy(RetentionPolicy <set-?>)Retention policy for the stream final IntegergetMaxConsumers()Maximum number of consumers allowed on this stream (-1 for unlimited) final UnitsetMaxConsumers(Integer <set-?>)Maximum number of consumers allowed on this stream (-1 for unlimited) final LonggetMaxMessages()Maximum number of messages to retain (-1 for unlimited) final UnitsetMaxMessages(Long <set-?>)Maximum number of messages to retain (-1 for unlimited) final LonggetMaxBytes()Maximum total bytes to retain (-1 for unlimited) final UnitsetMaxBytes(Long <set-?>)Maximum total bytes to retain (-1 for unlimited) final DurationgetMaxAge()Maximum age of messages to retain (Duration. final UnitsetMaxAge(Duration <set-?>)Maximum age of messages to retain (Duration. final IntegergetMaxMsgSize()Maximum size of a single message (-1 for unlimited) final UnitsetMaxMsgSize(Integer <set-?>)Maximum size of a single message (-1 for unlimited) final StorageTypegetStorageType()Storage type for the stream final UnitsetStorageType(StorageType <set-?>)Storage type for the stream final IntegergetReplicas()Number of replicas for the stream (1-5) final UnitsetReplicas(Integer <set-?>)Number of replicas for the stream (1-5) final BooleangetNoAck()Disable acknowledgments (used for fire-and-forget scenarios) final UnitsetNoAck(Boolean <set-?>)Disable acknowledgments (used for fire-and-forget scenarios) final DurationgetDuplicateWindow()Window within which to track duplicate messages final UnitsetDuplicateWindow(Duration <set-?>)Window within which to track duplicate messages final DiscardPolicygetDiscardPolicy()Discard policy when limits are reached final UnitsetDiscardPolicy(DiscardPolicy <set-?>)Discard policy when limits are reached final StringgetDescription()Description of the stream final UnitsetDescription(String <set-?>)Description of the stream final LonggetMaxMessagesPerSubject()Maximum messages per subject (-1 for unlimited) final UnitsetMaxMessagesPerSubject(Long <set-?>)Maximum messages per subject (-1 for unlimited) final Unitplacement(Function1<PlacementBuilder, Unit> block)Configure placement for the stream final Unitmirror(Function1<StreamSourceBuilder, Unit> block)Configure mirror to replicate another stream final Unitsource(Function1<StreamSourceBuilder, Unit> block)Add a source stream for aggregation -
-
Method Detail
-
getSubjects
final List<String> getSubjects()
List of subjects this stream listens to Supports wildcards (e.g., "orders.*", "payments.>")
-
setSubjects
final Unit setSubjects(List<String> <set-?>)
List of subjects this stream listens to Supports wildcards (e.g., "orders.*", "payments.>")
-
getRetentionPolicy
final RetentionPolicy getRetentionPolicy()
Retention policy for the stream
-
setRetentionPolicy
final Unit setRetentionPolicy(RetentionPolicy <set-?>)
Retention policy for the stream
-
getMaxConsumers
final Integer getMaxConsumers()
Maximum number of consumers allowed on this stream (-1 for unlimited)
-
setMaxConsumers
final Unit setMaxConsumers(Integer <set-?>)
Maximum number of consumers allowed on this stream (-1 for unlimited)
-
getMaxMessages
final Long getMaxMessages()
Maximum number of messages to retain (-1 for unlimited)
-
setMaxMessages
final Unit setMaxMessages(Long <set-?>)
Maximum number of messages to retain (-1 for unlimited)
-
getMaxBytes
final Long getMaxBytes()
Maximum total bytes to retain (-1 for unlimited)
-
setMaxBytes
final Unit setMaxBytes(Long <set-?>)
Maximum total bytes to retain (-1 for unlimited)
-
getMaxAge
final Duration getMaxAge()
Maximum age of messages to retain (Duration.ZERO for unlimited)
-
setMaxAge
final Unit setMaxAge(Duration <set-?>)
Maximum age of messages to retain (Duration.ZERO for unlimited)
-
getMaxMsgSize
final Integer getMaxMsgSize()
Maximum size of a single message (-1 for unlimited)
-
setMaxMsgSize
final Unit setMaxMsgSize(Integer <set-?>)
Maximum size of a single message (-1 for unlimited)
-
getStorageType
final StorageType getStorageType()
Storage type for the stream
-
setStorageType
final Unit setStorageType(StorageType <set-?>)
Storage type for the stream
-
getReplicas
final Integer getReplicas()
Number of replicas for the stream (1-5)
-
setReplicas
final Unit setReplicas(Integer <set-?>)
Number of replicas for the stream (1-5)
-
setNoAck
final Unit setNoAck(Boolean <set-?>)
Disable acknowledgments (used for fire-and-forget scenarios)
-
getDuplicateWindow
final Duration getDuplicateWindow()
Window within which to track duplicate messages
-
setDuplicateWindow
final Unit setDuplicateWindow(Duration <set-?>)
Window within which to track duplicate messages
-
getDiscardPolicy
final DiscardPolicy getDiscardPolicy()
Discard policy when limits are reached
-
setDiscardPolicy
final Unit setDiscardPolicy(DiscardPolicy <set-?>)
Discard policy when limits are reached
-
getDescription
final String getDescription()
Description of the stream
-
setDescription
final Unit setDescription(String <set-?>)
Description of the stream
-
getMaxMessagesPerSubject
final Long getMaxMessagesPerSubject()
Maximum messages per subject (-1 for unlimited)
-
setMaxMessagesPerSubject
final Unit setMaxMessagesPerSubject(Long <set-?>)
Maximum messages per subject (-1 for unlimited)
-
placement
final Unit placement(Function1<PlacementBuilder, Unit> block)
Configure placement for the stream
-
mirror
final Unit mirror(Function1<StreamSourceBuilder, Unit> block)
Configure mirror to replicate another stream
-
source
final Unit source(Function1<StreamSourceBuilder, Unit> block)
Add a source stream for aggregation
-
-
-
-