loopbackio / loopbackio/loopback4-example-kafka

Bad Consumer implementation in KafkaConsumer Controller

Offen
#2 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
TypeScript
Sterne
11
Forks
4
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

![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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
kafka, typescript
Bereich
backend, distributed-systems
Issue-Typ
Dokumentation
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
20/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.