rob3000 / nestjs-kafka

NestJS integration with KafkaJS
The Unlicense
130 stars 44 forks source link

Health check or ping #48

Open khirr opened 1 year ago

khirr commented 1 year ago

Hello Robert, thanks for this very useful plugin, I have added this to my project deployed on kubernetes but I was not able to find the way to check if the connection is successfully for a healthcheck, if the connection is broken I would stop sending traffic to the pod or restart it.

Is there a way to check if the connection is stablished from KafkaService?

Thank you.

rob3000 commented 1 year ago

Hey @khirr this is probably something that nestjs could help with, by default the service will fail to start if it can't connect to kafka and as such you could use the nestjs healthcheck: https://docs.nestjs.com/recipes/terminus