Class StreamConfig

  • All Implemented Interfaces:

    
    public final class StreamConfig
    
                        

    DSL for configuring JetStream streams

    Example usage:

    val streamCtx = js.stream("MY_STREAM") {
        subjects = listOf("orders.*", "payments.*")
        retentionPolicy = RetentionPolicy.LIMITS
        maxMessages = 1000000
        maxBytes = 1024 * 1024 * 1024 // 1GB
        storageType = StorageType.FILE
        replicas = 3
    }