Skip to content

Commit 9c8bbef

Browse files
committed
GH-2499: Document Param.r Annotation Limitations
Resolves #2499
1 parent a1d56d3 commit 9c8bbef

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
@@ -1533,6 +1533,8 @@ public void listen(@Payload String foo,
15331533
----
15341534
====
15351535

1536+
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.
1537+
15361538
Starting with version 2.5, instead of using discrete headers, you can receive record metadata in a `ConsumerRecordMetadata` parameter.
15371539

15381540
====
@@ -3020,7 +3022,7 @@ The event is normally published on the consumer thread, so it is safe to interac
30203022
The following example uses both `@KafkaListener` and `@EventListener`:
30213023

30223024
====
3023-
[source, xml]
3025+
[source, java]
30243026
----
30253027
public class Listener {
30263028

0 commit comments

Comments
 (0)