[zeromq-dev] basic question on queue workflow
Whit Armstrong
armstrong.whit at gmail.com
Fri May 4 15:40:55 CEST 2012
I am using an asynchronous req/rep pattern via a queue which looks like this:
client(DEALER)->queue(ROUTER/DEALER)->workers(REP)
If the client sends many jobs into it's dealer socket, then dies
before picking up those jobs do the jobs sit indefinitely in the queue
device? Or does the queue detect that the socket has disconnected,
and remove the jobs?
I guess the question really amounts to: what does a ROUTER do when it
does not have a destination to route to?
which I found here: http://api.zeromq.org/2-2:zmq-socket
When sending messages a ZMQ_ROUTER socket shall remove the first part
of the message and use it to determine the identity of the peer the
message shall be routed to. If the peer does not exist anymore the
message shall be silently discarded.
Am I looking at this the right way?
I'm using non-durable sockets, so if the client dies, and reconnects
it should have a new socket id, right?
The reason I'm asking the question is that I want to make sure that
it's not possible for a client that reconnects (from the same machine
for instance) to pick up old jobs that were submitted earlier into the
queue.
-Whit
More information about the zeromq-dev
mailing list