.createProducer("manual", new StringSerializer(), new IntegerSerializer()) .write(topicName, "key1", 1) .write(topicName, "key2", 2)
/** * Create an {@link InteractiveProducer simple producer} that can be used to write {@link Document} messages to the * cluster. * * @param producerName the name of the producer; may not be null * @return the object that can be used to produce messages; never null */ public InteractiveProducer<String, Document> createProducer(String producerName) { return createProducer(producerName, new StringSerializer(), new DocumentSerdes()); }