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

dq 的 consumerCluster 需要提供 Close 方法 #81

Open
marsmay opened this issue Dec 26, 2024 · 0 comments
Open

dq 的 consumerCluster 需要提供 Close 方法 #81

marsmay opened this issue Dec 26, 2024 · 0 comments

Comments

@marsmay
Copy link

marsmay commented Dec 26, 2024

目前 beanstalkd 的消费者 dq.consumerCluster 没有 Close 方法,无法在程序退出时调用实现安全关闭。
kafka 的 kq.kafkaQueue 是用 Stop 方法的,并设计了数据清理和安全关闭的方法。
希望能使用类似的设计,使 dq.consumerCluster 实现 service.Service 接口,从而将多个消费者包装成 service.ServiceGroup,这样可以利用 service.ServiceGroup 在程序处理时自动调用每个 service.Service 的 Stop 方法并等待结束的机制,实现安全退出。

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

1 participant