KAFKA_CONSUMER_THREADS

Number of consumer threads to start up. If you dedicate 3 threads to consumers then there will be three separate threads dedicated to three consumers that independently poll Kafka. If you want to dedicate an entire container to a single consumer then you would put this value to 1. The ideal value depends on use case, Kafka cluster configuration, and the hardware used to host the container. Having a thread count == your topic partition count is reasonable. If you have more threads than your partitions then the extra ones will just be idle.

Just keep in mind that messages in a topic partition are FIFO, so you won't get benefit if your topic only has a single partition.

Defaults to 1

Functions

Link copied to clipboard
fun get(): String?
Link copied to clipboard
fun getOrDefault(): String
Link copied to clipboard
fun require(fallback: String = default ?: ""): String
Link copied to clipboard
fun requireIf(condition: Boolean, fallback: String = default ?: ""): String

Properties

Link copied to clipboard
val default: String? = null

The default value.

Link copied to clipboard
val name: String
Link copied to clipboard
val ordinal: Int