1
votes

I have an application that uses Azure Eventhub as one of the services and I need to implement a public health check endpoint to my application. To do that, I need to assess the connection to the eventhub. Is there a way to achieve this?

1
you want to access the connection to the eventhub?Ivan Yang
yes. I need to assess it programmatically.Madusha
do you mean that: access eventhub instance via code -> then check if the connection successes or fails? and which program language are you using?Ivan Yang
@IvanYang, correct. My application uses kafka connector to communicate with the eventhub. So after the application got initialized, I should be able to check the health of my application at any given time. In that check, I need to assess the eventhub connection. The application is written in ballerina.Madusha
There is a managet library for eventhub. And it supports .net / java. So if you're using ballerina, I think you can only use Event hub management api to fetch it's status(like active / disable etc.).Ivan Yang

1 Answers

1
votes

If you're using ballerina, you can use the Get Event Hub rest api. In its response, it has a Status value which can be used to check the health.

For other languages like c# or java, you can directly use the Management library for event hub.