[zeromq-dev] Using zeromq in a distributed load pipeline, can I get the address of the last server a message was sent to?
John Connor
john.theman.connor at gmail.com
Fri Oct 1 23:41:27 CEST 2010
Hello,
Sorry if this question is a dupe, but I'm just starting to use zeromq
for a project, and I have looked everywhere for an answer to this
question:
If I set up a pipeline which distributes load across a cluster, I
would like to log on the sender where its messages get sent. This is
what I have in mind (python):
import zmq
context = zmq.Context()
socket = context.socket(zmq.DOWNSTREAM)
socket.connect("tcp://127.0.0.1:5000")
socket.connect("tcp://127.0.0.1:6000")
msg = "Hello World\0"
connection_string = socket.send(msg)
# should print "Sent message to tcp://127.0.0.1:5000"
print "Sent message to", connection_string
But I cant find anything that talks about this. Any help at all is appreciated.
Thanks,
--Connor
More information about the zeromq-dev
mailing list