Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Kafka Consumer : Required Properties

Code Block
languagejava
Properties props = new Properties();
props.put("bootstrap.servers", "Broker-1:9092, Broker-2:9093"); //Cluster membership: partition leader, etc.
props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");//used for message serialization and deserialization
props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer")