Implement heartbeat messages for the cluster

fixes #7745