Skip to content

Commit

Permalink
GH-2499: Document Param.r Annotation Limitations
Browse files Browse the repository at this point in the history
Resolves #2499
  • Loading branch information
garyrussell committed Dec 5, 2022
1 parent a1d56d3 commit 9c8bbef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spring-kafka-docs/src/main/asciidoc/kafka.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,8 @@ public void listen(@Payload String foo,
----
====

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.

Starting with version 2.5, instead of using discrete headers, you can receive record metadata in a `ConsumerRecordMetadata` parameter.

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

====
[source, xml]
[source, java]
----
public class Listener {
Expand Down

0 comments on commit 9c8bbef

Please sign in to comment.