adding metadata support in heartbeat and subscribe requests