I like this approach.

I'm not sure how options invalid on different versions, are handled by zmq. Does it reliably return an error state?