Skip to content

Instantly share code, notes, and snippets.

@jnbdz
Created March 30, 2018 23:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnbdz/dcf5725e885e2d2670d162d6f286eec9 to your computer and use it in GitHub Desktop.
Save jnbdz/dcf5725e885e2d2670d162d6f286eec9 to your computer and use it in GitHub Desktop.
/**
* Page: 44-45
*/
private Properties kafkaProps = new Properties();
kafkaProps.put("bootstrap.severs", "broker1:9092,broker2:9092");
kafkaProps.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
kafkaProps.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
producer = new KafkaProducer<String, String>(kafkaProps);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment