ConsumerSettings

data class ConsumerSettings<K, V>(    val bootstrapServers: String,     val keyDeserializer: Deserializer<K>,     val valueDeserializer: Deserializer<V>,     val groupId: String,     val clientDnsLookup: ClientDnsLookup = ClientDnsLookup.USE_ALL_DNS_IPS,     val sessionTimeOut: Duration = Duration.ofMillis(10000),     val heartbeatInterval: Duration = Duration.ofMillis(3000),     val autoOffsetReset: AutoOffsetReset = AutoOffsetReset.Latest,     val partitionAssignmentStrategy: List<Class<*>> = listOf(RangeAssignor::class.java),     val metadataMaxAge: Long = (5 * 60 * 1000).toLong(),     val enableAutoCommit: Boolean = true,     val autoCommitInterval: Duration = Duration.ofMillis(5000),     val clientId: String = "",     val maxPartitionFetchBytes: Int = DEFAULT_MAX_PARTITION_FETCH_BYTES,     val sendBuffer: Int = 128 * 1024,     val receiveBuffer: Int = 64 * 1024,     val fetchMinBytes: Int = 1,     val fetchMaxBytes: Int = ConsumerConfig.DEFAULT_FETCH_MAX_BYTES,     val fetchMaxWait: Duration = Duration.ofMillis(500),     val reconnectBackoff: Duration = Duration.ofMillis(50L),     val reconnectBackoffMax: Duration = Duration.ofMillis(1000),     val retryBackoff: Duration = Duration.ofMillis(100),     val checkCrcs: Boolean = true,     val metricsSampleWindow: Duration = Duration.ofMillis(30000),     val metricsNumSamples: Int = 2,     val metricsRecordingLevel: Sensor.RecordingLevel = Sensor.RecordingLevel.INFO,     val metricsReporterClasses: List<Class<*>> = emptyList(),     val requestTimeout: Duration = Duration.ofMillis(30000),     val defaultApiTimeout: Duration = Duration.ofMillis(60 * 1000),     val connectionsMaxIdle: Duration = Duration.ofMillis(9 * 60 * 1000),     val interceptorClasses: List<Class<*>> = emptyList(),     val maxPollRecords: Int = 500,     val maxPollInterval: Duration = Duration.ofMillis(300000),     val excludeInternalTopics: Boolean = ConsumerConfig.DEFAULT_EXCLUDE_INTERNAL_TOPICS,     properties: Properties? = null)

Default values taken from org.apache.kafka.clients.consumer.ConsumerConfig

Constructors

Link copied to clipboard
fun <K, V> ConsumerSettings(    bootstrapServers: String,     keyDeserializer: Deserializer<K>,     valueDeserializer: Deserializer<V>,     groupId: String,     clientDnsLookup: ClientDnsLookup = ClientDnsLookup.USE_ALL_DNS_IPS,     sessionTimeOut: Duration = Duration.ofMillis(10000),     heartbeatInterval: Duration = Duration.ofMillis(3000),     autoOffsetReset: AutoOffsetReset = AutoOffsetReset.Latest,     partitionAssignmentStrategy: List<Class<*>> = listOf(RangeAssignor::class.java),     metadataMaxAge: Long = (5 * 60 * 1000).toLong(),     enableAutoCommit: Boolean = true,     autoCommitInterval: Duration = Duration.ofMillis(5000),     clientId: String = "",     maxPartitionFetchBytes: Int = DEFAULT_MAX_PARTITION_FETCH_BYTES,     sendBuffer: Int = 128 * 1024,     receiveBuffer: Int = 64 * 1024,     fetchMinBytes: Int = 1,     fetchMaxBytes: Int = ConsumerConfig.DEFAULT_FETCH_MAX_BYTES,     fetchMaxWait: Duration = Duration.ofMillis(500),     reconnectBackoff: Duration = Duration.ofMillis(50L),     reconnectBackoffMax: Duration = Duration.ofMillis(1000),     retryBackoff: Duration = Duration.ofMillis(100),     checkCrcs: Boolean = true,     metricsSampleWindow: Duration = Duration.ofMillis(30000),     metricsNumSamples: Int = 2,     metricsRecordingLevel: Sensor.RecordingLevel = Sensor.RecordingLevel.INFO,     metricsReporterClasses: List<Class<*>> = emptyList(),     requestTimeout: Duration = Duration.ofMillis(30000),     defaultApiTimeout: Duration = Duration.ofMillis(60 * 1000),     connectionsMaxIdle: Duration = Duration.ofMillis(9 * 60 * 1000),     interceptorClasses: List<Class<*>> = emptyList(),     maxPollRecords: Int = 500,     maxPollInterval: Duration = Duration.ofMillis(300000),     excludeInternalTopics: Boolean = ConsumerConfig.DEFAULT_EXCLUDE_INTERNAL_TOPICS,     properties: Properties? = null)

Functions

Link copied to clipboard
fun properties(): Properties

Properties

Link copied to clipboard
val autoCommitInterval: Duration
Link copied to clipboard
val autoOffsetReset: AutoOffsetReset
Link copied to clipboard
val bootstrapServers: String
Link copied to clipboard
val checkCrcs: Boolean = true
Link copied to clipboard
val clientDnsLookup: ClientDnsLookup
Link copied to clipboard
val clientId: String
Link copied to clipboard
val connectionsMaxIdle: Duration
Link copied to clipboard
val defaultApiTimeout: Duration
Link copied to clipboard
val enableAutoCommit: Boolean = true
Link copied to clipboard
val excludeInternalTopics: Boolean
Link copied to clipboard
val fetchMaxBytes: Int
Link copied to clipboard
val fetchMaxWait: Duration
Link copied to clipboard
val fetchMinBytes: Int = 1
Link copied to clipboard
val groupId: String
Link copied to clipboard
val heartbeatInterval: Duration
Link copied to clipboard
val interceptorClasses: List<Class<*>>
Link copied to clipboard
val keyDeserializer: Deserializer<K>
Link copied to clipboard
val maxPartitionFetchBytes: Int
Link copied to clipboard
val maxPollInterval: Duration
Link copied to clipboard
val maxPollRecords: Int = 500
Link copied to clipboard
val metadataMaxAge: Long
Link copied to clipboard
val metricsNumSamples: Int = 2
Link copied to clipboard
val metricsRecordingLevel: Sensor.RecordingLevel
Link copied to clipboard
val metricsReporterClasses: List<Class<*>>
Link copied to clipboard
val metricsSampleWindow: Duration
Link copied to clipboard
val partitionAssignmentStrategy: List<Class<*>>
Link copied to clipboard
val receiveBuffer: Int
Link copied to clipboard
val reconnectBackoff: Duration
Link copied to clipboard
val reconnectBackoffMax: Duration
Link copied to clipboard
val requestTimeout: Duration
Link copied to clipboard
val retryBackoff: Duration
Link copied to clipboard
val sendBuffer: Int
Link copied to clipboard
val sessionTimeOut: Duration
Link copied to clipboard
val valueDeserializer: Deserializer<V>

Sources

Link copied to clipboard