You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/class-level-kafkalistener.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
= `@KafkaListener` on a Class
3
3
4
4
When you use `@KafkaListener` at the class-level, you must specify `@KafkaHandler` at the method level.
5
-
If you do not use `@KafkaHandler`, no method will be used as a listener.
6
-
7
-
IMPORTANT: This is because a class annotated at the class-level may be extended or inherited in various ways.
5
+
If no `@KafkaHandler` on any methods of this class or its sub-classes, the framework will reject such a configuration.
6
+
The `@KafkaHandler` annotation is required for explicit and concise purpose of the method.
7
+
Otherwise it is hard to make a decision about this or other method without extra restrictions.
8
8
9
9
When messages are delivered, the converted message payload type is used to determine which method to call.
0 commit comments