fix heartbeat bug for amqp & add config option for heartbeat