import org.apache.kafka.clients.consumer.ConsumerConfig
val conf = new java.util.Properties()
conf.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, ":9092,localhost:9192")
import org.apache.kafka.common.serialization.Serdes
conf.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, Serdes.String.deserializer.getClass)
conf.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, Serdes.String.deserializer.getClass)
import org.apache.kafka.clients.consumer.KafkaConsumer
val consumer = new KafkaConsumer[String, String](conf)
ConsumerConfig — Configuration Properties for KafkaConsumer
ConsumerConfig
is a Apache Kafka AbstractConfig for the configuration properties of a KafkaConsumer.
Name, Property, Default Value | Description | ||||
---|---|---|---|---|---|
|
|||||
|
|||||
Default: 5 mins |
|||||
Default: RangeAssignor |
The class name of the partition assignment strategy that the client will use to distribute partition ownership amongst consumer instances when group management is used
Used when:
|
||||
Default: |