senderOptions

fun <K, V> senderOptions(options: MutableSenderOptions<K, V>.() -> Unit): SenderOptions<K, V>

This function creates SenderOptions using the provided configuration block.

Return

SenderOptions.

Example usage:

val senderOptions = senderOptions<String, String> {
keySerializer { _, data -> data.encodeToByteArray() }
valueSerializer { _, data -> data.encodeToByteArray() }

properties {
BOOTSTRAP_SERVERS_CONFIG to "localhost:9092"
}
}

Parameters

options

A lambda with receiver to configure MutableSenderOptions.