loopbackio / loopbackio/loopback4-example-kafka

Bad Consumer implementation in KafkaConsumer Controller

Aperta
#2 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
TypeScript
Stelle
11
Fork
4
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
kafka, typescript
Ambito
backend, distributed-systems
Tipo di issue
Documentazione
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.