adding metadata support for heartbeat and subscribe requests