splitting zmq_loop in a separate class