I'm using a ROUTER-to-DEALER design and in-between I'm doing some processing, mainly unserialized my data. But sometimes I need to re-send a payload in backend so to a Worker destination.
Re-send a payload is easy but I need to re-send it to a new worker ( a free one or at least not the same worker ).
I noticed that *_multipart function holds three fields with the first one an address ( to a worker ? ). 
Q: Is there a way to find address of a free worker?
ZeroMQ provides feature-rich tools, all the rest above is Designer's job:
Given the task description above, the possible approach is to create an application-level logic ( a distributed Finite State Automaton ( dFSA ) with certain depth of process-state memory ), where task-phases' processors report ( guess how -- again by a parallel ZeroMQ signalling / messaging dFSA infrastructure ) achieving ( { enter- | exit- }-triggered state-change ) any of the recognised states and the dFSA logic will thus on the global scale permit to orchestrate and operate the above requested "side"-steps, "branches" and/or "re-submit"-s and similar créme a'la créme tricks.
Each ( free )-worker simply always notifies the dFSA-infrastructure it's ( task-unit )-exit-triggered state-change and your dFSA-infrastructure thus always knows + does not search ad-hoc for an address of any such worker, as it explicitly continuously keeps records on free-state dFSA-nodes ( to pick from ). Re-discovery, watch-dogs, heart-beats and re-confirmation handshaking schemes are also possible within the dFSA-infrastructure signalling.
That simple.
How to re-send a payload to a free worker in ZeroMQ?