-
Notifications
You must be signed in to change notification settings - Fork 43
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
请问用这个sdk 如何消费事件,有例子可以提供参考么 #12
Labels
Comments
我也遇到同样的问题,求解。 |
@wilderchen 现在用上生产环境了么 |
刚决定弃用。 |
订阅完了,就消费了 consumer.subscribe('you-topic', '*', function*(msg) {
// 这里放你的消费逻辑,这里不报错就认为消费完了
}); |
egg 里面可以使用 egg-ons 插件,消费更简单 |
@wilderchen 现在阿里内部也是用的这个模块,只是不需要鉴权 |
我猜他问的就是 .done() 的问题 |
对,没有 done的方法,现在转用 rabbitmq 了 ,文档比较全 |
如果要对node的用户商业化,建议提供比较完善的文档资料 |
场景:
consumer.subscribe('topicA', 'tagA', function * (msg) {
...
})
consumer.subscribe('topicA', 'tagA', function * (msg) {
...
})
consumer.subscribe('topicA', 'tagB', function * (msg) {
...
}) 改回 tagA 启动,收不到消息,改成 * 也收不到 consumer.subscribe('topicA', 'tagA', function * (msg) {
...
}) consumer.subscribe('topicA', '*', function * (msg) {
...
}) 什么原理?? |
@leoliew done 的问题参考这里的的讨论 eggjs/egg#1468 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
看example 只看到订阅消息,没看到如何消费
The text was updated successfully, but these errors were encountered: