optimize work context and message resolution
switch to non-timeout polling for zmq and implement more graceful shutdown