loopbackio / loopbackio/loopback4-example-kafka

Bad Consumer implementation in KafkaConsumer Controller

未关闭
#2 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
11
派生
4
PR 合并指标
30 天内没有已合并 PR

描述

![image](https://user-images.githubusercontent.com/5878617/56789643-a9d45900-6802-11e9-9460-071c97dadcc2.png)

If you activate the 'consumer.on message' event, this never ends, you will hear the messages until eternity.

Although there is a consumer, the closure of something happens with the life cycle and the consumer's problems a little more after sending the response.

Maybe I should wait for the consumer.close callback to issue the answer.

Therefore, if the controller issues his response and after this, the listener adds a new message to the response, we will get this error.

By definition, the consumer of Kafka behaves like a service or a demon and must start as a process at the beginning of the application.

Could you explain the best practice to do this? In loopback 3 we would use 'boot' directory to add a file with this responsibility.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

Start by examining the KafkaConsumer Controller and the consumer.on message lifecycle described in the issue. Compare the requested startup responsibility with the LoopBack 3 boot directory approach. Done means documenting the recommended way to run the Kafka consumer as an application-started service and avoid sending responses after the controller lifecycle ends.

由索引模型根据 Issue 内容生成。

评估

技术栈
kafka, typescript
领域
backend, distributed-systems
Issue 类型
文档
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
20/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。