loopbackio / loopbackio/loopback4-example-kafka

Bad Consumer implementation in KafkaConsumer Controller

オープン
#2 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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. リポジトリをフォークし、ブランチを切って変更します。
  4. 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 を短くまとめたダイジェスト。