Apache Kafka - III - Producers
Spanish version / Versión en Español All code examples in this post will be in Java , for simplicity; however, keep in mind that Kafka offers client libraries in a myriad of languages. More specifically, in a Maven project, the Kafka dependency can be defined by: groupId: org.apache.kafka artifactId: kafka-clients version: 0.10.0.1 (or newer if available) So, to create a producer, some basic properties are required (although there are many, many more optional properties to tweak): Properties props = new Properties(); props.put("bootstrap.servers", "BROKER-1:9092, BROKER-2:9093"); props.put("key.serializer", "org.apache.common.serialization.StringSerializer"); props.put("value.serializer", "org.apache.common.serialization.StringSerializer"); The bootstrap.servers property defines a list of brokers in the cluster the producer can connect to. It doesn't need to be a full list of the cluster...