Skip to content

Commit

Permalink
Update config example type in doc
Browse files Browse the repository at this point in the history
Examples show `KafkaTemplate<Integer, String>` and `ProducerFactory<Integer, String>`, but sample config had `ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG` set as `StringSerializer.class`
  • Loading branch information
pat-goins authored Oct 7, 2022
1 parent d4619f0 commit 4bcb503
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spring-kafka-docs/src/main/asciidoc/kafka.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public ProducerFactory<Integer, String> producerFactory() {
public Map<String, Object> producerConfigs() {
Map<String, Object> props = new HashMap<>();
props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, IntegerSerializer.class);
props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
// See https://kafka.apache.org/documentation/#producerconfigs for more properties
return props;
Expand Down

0 comments on commit 4bcb503

Please sign in to comment.