I might have misunderstood your goal here. But there is a way to send multipart messages using zmq, meaning you can easily add an extra field that you can test on the other side to figure out how to handle your data.
Have a look at socket.send_multipart
and socket.recv_multipart
.
http://zeromq.github.io/pyzmq/api/zmq.html#zmq.Socket.send_multipart
Using these you can do something like: send_multipart(["description_of_data", data])
and use recv_multipart()
to receive a list on the other side. You can check the first element and handle the data accordingly.
The question is a bit unclear, if what you meant was a way to address specific receivers, have a look at the router/dealer xrep/xreq socket types, they include a routing envelope where you can target specific endpoints if you know their identity.