DEV Community

Discussion on: Kafkajs & NestJS with Typescript Simplified Example

Collapse
 
khavng profile image
Kha Nguyen

Thanks for the guide!
On the process of applying your code, I tried to make the KafkaModule not global but it did not work.
Is it a must for making KafkaModule global? Then why?
Thanks again!!

Collapse
 
rajeshkumarbehura profile image
Rajesh Kumar

Making KafkaModule as global like database connection, in every module you do not need to inject KafkaModule. If you do not want kafka module as global, then "class KafkaModule",. you need modify. Create as normal Module class as per nestjs