Skip to content

Commit 4bcb503

Browse files
authored
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 d4619f0 commit 4bcb503

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public ProducerFactory<Integer, String> producerFactory() {
238238
public Map<String, Object> producerConfigs() {
239239
Map<String, Object> props = new HashMap<>();
240240
props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
241-
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
241+
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, IntegerSerializer.class);
242242
props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
243243
// See https://kafka.apache.org/documentation/#producerconfigs for more properties
244244
return props;

0 commit comments

Comments
 (0)