Skip to content

Commit

Permalink
Fix typos in the EnableKafka and tips.adoc (#3412)
Browse files Browse the repository at this point in the history
  • Loading branch information
bky373 committed Aug 9, 2024
1 parent cc926b3 commit 930b412
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ The following is an example of how to use the power of a SpEL expression to crea
[source, java]
----
@KafkaListener(topicPartitions = @TopicPartition(topic = "compacted",
partitions = "#{@finder.partitions('compacted')}"),
partitions = "#{@finder.partitions('compacted')}",
partitionOffsets = @PartitionOffset(partition = "*", initialOffset = "0")))
public void listen(@Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String key, String payload) {
public void listen(@Header(KafkaHeaders.RECEIVED_KEY) String key, String payload) {
...
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 the original author or authors.
* Copyright 2016-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,7 +27,7 @@
/**
* Enable Kafka listener annotated endpoints that are created under the covers by a
* {@link org.springframework.kafka.config.AbstractKafkaListenerContainerFactory
* AbstractListenerContainerFactory}. To be used on
* AbstractKafkaListenerContainerFactory}. To be used on
* {@link org.springframework.context.annotation.Configuration Configuration} classes as
* follows:
*
Expand Down Expand Up @@ -117,7 +117,7 @@
*
* <pre class="code">
* &#064;KafkaListener(containerFactory = "myKafkaListenerContainerFactory", topics = "myTopic")
* public void process(String msg, @Header("kafka_partition") int partition) {
* public void process(String msg, @Header(KafkaHeaders.RECEIVED_PARTITION) int partition) {
* // process incoming message
* }
* </pre>
Expand Down Expand Up @@ -174,7 +174,7 @@
* &#064;Override
* public void configureKafkaListeners(KafkaListenerEndpointRegistrar registrar) {
* registrar.setEndpointRegistry(myKafkaListenerEndpointRegistry());
* registrar.setMessageHandlerMethodFactory(myMessageHandlerMethodFactory);
* registrar.setMessageHandlerMethodFactory(myMessageHandlerMethodFactory());
* registrar.setValidator(new MyValidator());
* }
*
Expand Down Expand Up @@ -233,6 +233,7 @@
* @author Stephane Nicoll
* @author Gary Russell
* @author Artem Bilan
* @author Borahm Lee
*
* @see KafkaListener
* @see KafkaListenerAnnotationBeanPostProcessor
Expand Down

0 comments on commit 930b412

Please sign in to comment.