loopbackio / loopbackio/loopback4-example-kafka
Bad Consumer implementation in KafkaConsumer Controller
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

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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- 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