A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  R  S  T  U  V  W 

C

close() - function in eu.vstoyanov.natsy.NatsKlient
Cancel everything running on scope and close the connection immediatelycloseGracefully is the graceful counterpart: it drains first, so nothing in flight is lost.
closeBlocking(kotlin.time.Duration) - function in eu.vstoyanov.natsy.NatsKlient
closeGracefully for callers that cannot suspendBlocks the calling thread for up to timeout on the drain.
closeGracefully(kotlin.time.Duration) - function in eu.vstoyanov.natsy.NatsKlient
Drain, then close: the complete shutdown sequence in one calldrain delivers what is already in flight and closes the connection; close then cancels scope and releases its dispatchers.
codecFor(kotlin.reflect.KClass) - function in eu.vstoyanov.natsy.codec.CodecRegistry
Codec registered for type, or null when the type has noneLookup is exact, and deliberately has no fallback: MessageCodec<T> is erased, so a codec for some other type would pass every cast the compiler can write here and be handed back as a MessageCodec<T> that encodes and decodes something else entirely - a ClassCastException from inside the codec on publish, a value of the wrong class in Flow<T> on subscribe.
codecForContentType(java.lang.String) - function in eu.vstoyanov.natsy.codec.CodecRegistry
Get codec by content type header
CodecRegistry - class in eu.vstoyanov.natsy.codec
Registry for message codecs used for serialization/deserializationSupports pluggable serialization strategies and automatic content-type negotiation
CodecRegistry.Builder - class in eu.vstoyanov.natsy.codec.CodecRegistry
Builder for CodecRegistry
CodecRegistryKt - class in eu.vstoyanov.natsy.codec
 
codecs(kotlin.jvm.functions.Function1) - function in eu.vstoyanov.natsy.KlientConfigBuilder
Configure codecs for serialization/deserialization
configureJson(kotlin.jvm.functions.Function1) - function in eu.vstoyanov.natsy.codec.CodecRegistry.Builder
Adjust the Json instance that backs every JSON codecThe block starts from the registry's defaults (lenient, unknown keys ignored, defaults not encoded) and changes only what it names:
codecs {
    configureJson { explicitNulls = false }
    registerJson(OrderEvent::class, OrderEvent.serializer())
}
A codec captures the configuration when it is registered, so this has to come first.
consumer(java.lang.String,java.lang.String,kotlin.jvm.functions.Function1) - function in eu.vstoyanov.natsy.jetstream.JetStreamContext
Create or update a JetStream consumerIf the consumer doesn't exist, a new one is created from the configuration block.
consumer(java.lang.String,kotlin.jvm.functions.Function1) - function in eu.vstoyanov.natsy.jetstream.StreamContext
Create or update a consumer on this streamIf the consumer doesn't exist, a new one is created from the configuration block.
ConsumerConfig - class in eu.vstoyanov.natsy.jetstream
DSL for configuring JetStream consumersExample usage:
val consumerCtx = js.consumer("MY_STREAM", "MY_CONSUMER") {
    durable = "MY_CONSUMER"
    deliverPolicy = DeliverPolicy.ALL
    ackPolicy = AckPolicy.EXPLICIT
    ackWait = 30.seconds
    maxDeliver = 5
    filterSubject = "orders.>"
}
ConsumerConfigBuilder - class in eu.vstoyanov.natsy.jetstream
Builder for JetStream consumer configuration
ConsumerContext - class in eu.vstoyanov.natsy.jetstream
Context for JetStream consumer operationsProvides access to consumer management and monitoring including:
  • Consumer information and updates

  • Pause/resume operations

  • Monitoring metrics

Example usage:
val consumerCtx = js.consumer("MY_STREAM", "MY_CONSUMER") {
    durable = "MY_CONSUMER"
    ackPolicy = AckPolicy.EXPLICIT
    maxDeliver = 5
}.getOrThrow()

// Update the consumer
consumerCtx.update {
    maxDeliver = 10
}

// Pause the consumer until it is explicitly resumed
consumerCtx.pause()

// ...or until a deadline, after which the server resumes it automatically
consumerCtx.pause(30.minutes)

// Check status
val isPaused = consumerCtx.isPaused()
consumers() - function in eu.vstoyanov.natsy.jetstream.StreamContext
List all consumers on this streamReturns a Flow of ConsumerInfo for all consumers attached to this stream.
create(kotlin.jvm.functions.Function1) - function in eu.vstoyanov.natsy.NatsKlient.Companion
Creates a new NatsKlient instance with DSL configuration
create(java.lang.String,T) - function in eu.vstoyanov.natsy.jetstream.KeyValueStore
Create a new key-value pair only if the key doesn't exist
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  R  S  T  U  V  W