What is best way to handle disconnection from confD?

if confd is not able to send Heartbeat in defined interval time, how Application shall decide that confd is dead ?

do we need to put same timeout in poll?

Refer to the confd_lib_events section in Vol. 3 of ConfD man-pages for the following two events:

CONFD_NOTIF_HEARTBEAT

This event can be be used by applications that wish to monitor the health and liveness of ConfD
itself. It needs to be requested through a call to confd_notifications_connect2(),
where the required heartbeat_interval can be provided via the struct
confd_notifications_data parameter. ConfD will continuously generate heartbeat events on
the notification socket. If ConfD fails to do so, ConfD is hung, or prevented from getting the CPU time
required to send the event. The timeout interval is measured in milliseconds. Recommended value is
10000 milliseconds to cater for truly high load situations. Values less than 1000 are changed to 1000.

CONFD_NOTIF_HEALTH_CHECK

This event is similar to CONFD_NOTIF_HEARTBEAT, in that it can be be used by
applications that wish to monitor the health and liveness of ConfD itself. However while
CONFD_NOTIF_HEARTBEAT will be generated as long as ConfD is not completely hung,
CONFD_NOTIF_HEALTH_CHECK will only be generated after a basic liveness check of the different
ConfD subsystems has completed successfully. This event also needs to be requested through a call
to confd_notifications_connect2(), where the required health_check_interval
can be provided via the struct confd_notifications_data parameter. Since the event
generation incurs more processing than CONFD_NOTIF_HEARTBEAT, a longer interval than 10000
milliseconds is recommended, but in particular the application must be prepared for the actual interval
to be significantly longer than the requested one in high load situations. Values less than 1000 are
changed to 1000.