Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kafka的用法可能有点问题 #42

Open
JsonMa opened this issue Nov 29, 2019 · 2 comments
Open

kafka的用法可能有点问题 #42

JsonMa opened this issue Nov 29, 2019 · 2 comments

Comments

@JsonMa
Copy link

JsonMa commented Nov 29, 2019

目前的kafka消费策略是有点问题的,没有从根本解决kafka fetch loop的问题,虽然队列限制了10000的大小,但是fetch loop会一直执行,除非手动pause,offset会一直自动提交。如果收到消息后判断当前队列大于10000后,直接return是会丢失消息的。同时,当消息量增加,消费能力较弱时,node eventloop由于在不停触发on message事件,会导致eventloop队列内持续增长,有内存溢出的风险。

@JsonMa
Copy link
Author

JsonMa commented Nov 29, 2019

@wangweianger

@fe-linjin
Copy link

目前的kafka消费策略是有点问题的,没有从根本解决kafka fetch loop的问题,虽然队列限制了10000的大小,但是fetch loop会一直执行,除非手动pause,offset会一直自动提交。如果收到消息后判断当前队列大于10000后,直接return是会丢失消息的。同时,当消息量增加,消费能力较弱时,node eventloop由于在不停触发on message事件,会导致eventloop队列内持续增长,有内存溢出的风险。

我也觉得是的,请问这位老哥是怎么解决的?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants