I noticed that a zeromq PUB socket will buffers all outgoing data if it is connecting, for example
import zmq import time context = zmq.Context() # create a PUB
Here's a hack that might help...
Set your ZMQ::HWM to a fixed number, say 10. Upon connection, call the subscriber socket's recv method in a loop until it discards all the buffered messages, and only THEN start your main receiving loop.
ZMQ::HWM
recv