@ Scheduled ( fixedDelay = "${micronaut.heartbeat.interval:15s}" , initialDelay = "${micronaut.heartbeat.initial-delay:5s}" ) public void pulsate ( ) { ServiceInstance instance = eventReference . get ( ) ; if ( instance != null ) { eventPublisher . publishEvent ( new HeartbeatEvent ( instance , currentHealthStatus . current ( ) ) ) ; } }
Publish the heartbeat event with current health status .