gate the zmq call

sorry @jacksontj, I thought we had meged some other code here,
this should fix it correctly
fix lint
Merge pull request #16344 from thatch45/gate_zmq

gate the zmq call