nestjs-kafka icon indicating copy to clipboard operation
nestjs-kafka copied to clipboard

Health check or ping

Open khirr opened this issue 2 years ago • 1 comments

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.

khirr avatar Oct 30 '22 04:10 khirr

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

rob3000 avatar Nov 07 '22 03:11 rob3000