Skip to content

Commit 0547dc7

Browse files
pat-goinsgaryrussell
authored andcommitted
Update config example type in doc
Examples show `KafkaTemplate<Integer, String>` and `ProducerFactory<Integer, String>`, but sample config had `ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG` set as `StringSerializer.class`
1 parent a03f67b commit 0547dc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-kafka-docs/src/main/asciidoc/kafka.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public ProducerFactory<Integer, String> producerFactory() {
235235
public Map<String, Object> producerConfigs() {
236236
Map<String, Object> props = new HashMap<>();
237237
props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
238-
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
238+
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, IntegerSerializer.class);
239239
props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
240240
// See https://kafka.apache.org/documentation/#producerconfigs for more properties
241241
return props;

0 commit comments

Comments
 (0)