Skip to content

Commit 08951f5

Browse files
committed
GH-2499: Document Param.r Annotation Limitations
Resolves #2499
1 parent 78a9944 commit 08951f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,8 @@ public void listen(@Payload String foo,
14691469
----
14701470
====
14711471

1472+
IMPORTANT: Parameter annotations (`@Payload`, `@Header`) must be specified on the concrete implementation of the listener method; they will not be detected if they are defined on an interface.
1473+
14721474
Starting with version 2.5, instead of using discrete headers, you can receive record metadata in a `ConsumerRecordMetadata` parameter.
14731475

14741476
====
@@ -2965,7 +2967,7 @@ The event is normally published on the consumer thread, so it is safe to interac
29652967
The following example uses both `@KafkaListener` and `@EventListener`:
29662968

29672969
====
2968-
[source, xml]
2970+
[source, java]
29692971
----
29702972
public class Listener {
29712973

0 commit comments

Comments
 (0)