refactor heartbeats to follow rabbitmq-java-client's model