Skip to content

Commit 930b412

Browse files
authored
Fix typos in the EnableKafka and tips.adoc (#3412)
1 parent cc926b3 commit 930b412

File tree

2 files changed

+7
-6
lines changed
  • spring-kafka-docs/src/main/antora/modules/ROOT/pages
  • spring-kafka/src/main/java/org/springframework/kafka/annotation

2 files changed

+7
-6
lines changed

spring-kafka-docs/src/main/antora/modules/ROOT/pages/tips.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ The following is an example of how to use the power of a SpEL expression to crea
1212
[source, java]
1313
----
1414
@KafkaListener(topicPartitions = @TopicPartition(topic = "compacted",
15-
partitions = "#{@finder.partitions('compacted')}"),
15+
partitions = "#{@finder.partitions('compacted')}",
1616
partitionOffsets = @PartitionOffset(partition = "*", initialOffset = "0")))
17-
public void listen(@Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String key, String payload) {
17+
public void listen(@Header(KafkaHeaders.RECEIVED_KEY) String key, String payload) {
1818
...
1919
}
2020

spring-kafka/src/main/java/org/springframework/kafka/annotation/EnableKafka.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 the original author or authors.
2+
* Copyright 2016-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
2727
/**
2828
* Enable Kafka listener annotated endpoints that are created under the covers by a
2929
* {@link org.springframework.kafka.config.AbstractKafkaListenerContainerFactory
30-
* AbstractListenerContainerFactory}. To be used on
30+
* AbstractKafkaListenerContainerFactory}. To be used on
3131
* {@link org.springframework.context.annotation.Configuration Configuration} classes as
3232
* follows:
3333
*
@@ -117,7 +117,7 @@
117117
*
118118
* <pre class="code">
119119
* &#064;KafkaListener(containerFactory = "myKafkaListenerContainerFactory", topics = "myTopic")
120-
* public void process(String msg, @Header("kafka_partition") int partition) {
120+
* public void process(String msg, @Header(KafkaHeaders.RECEIVED_PARTITION) int partition) {
121121
* // process incoming message
122122
* }
123123
* </pre>
@@ -174,7 +174,7 @@
174174
* &#064;Override
175175
* public void configureKafkaListeners(KafkaListenerEndpointRegistrar registrar) {
176176
* registrar.setEndpointRegistry(myKafkaListenerEndpointRegistry());
177-
* registrar.setMessageHandlerMethodFactory(myMessageHandlerMethodFactory);
177+
* registrar.setMessageHandlerMethodFactory(myMessageHandlerMethodFactory());
178178
* registrar.setValidator(new MyValidator());
179179
* }
180180
*
@@ -233,6 +233,7 @@
233233
* @author Stephane Nicoll
234234
* @author Gary Russell
235235
* @author Artem Bilan
236+
* @author Borahm Lee
236237
*
237238
* @see KafkaListener
238239
* @see KafkaListenerAnnotationBeanPostProcessor

0 commit comments

Comments
 (0)