[Bug]kafka组件不能把消费者代码放在两个或以上文件里,只能放在同一个@Consumer装饰的class里 #4048
Closed
Yuliang-Lee
started this conversation in
General / 闲聊
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
虽然组件内有查找所有被
@Consumer
装饰的模块并且根据内部的@KafkaListener
执行subscribe
方法,但只有第一次执行的会被注册进消息回调里,这是
kafkajs
的逻辑: https://github.com/tulios/kafkajs/blob/master/src/consumer/index.js#L199 , 多次调用无效Beta Was this translation helpful? Give feedback.
All reactions