[zeromq-dev] Another 0MQ 2.0 Model Question

Martin Sustrik sustrik at fastmq.com
Wed Oct 21 12:19:21 CEST 2009


Christian Mannes wrote:
 > Hi Martin,
 >
 > I didn't say "quick" delivery, but "queued": the question is, is 
there/will
 > there be a mode in which messages are asynchronously delivered to a 
specific
 > peer in a _reliable_ fashion (meaning, whether or not that peer is 
currently
 > listening - or even running)? PUB/SUB only delivers if the recipient is
 > listening. If the peer isn't listening, the message is lost. The question
 > then was, will P2P be queuing the messages? If not, what is the 
difference
 > between P2P and PUB/SUB with a "private topic"?

I see.

The messages are queued in all cases. What you are missing is a way to 
let the peer know that the restarted/reconnected application is the same 
  application as before and that messages that were queued in the 
meantime should be delivered to it. That's what "IDENTITY" option is 
about. It allows you to associate your application instance with a name, 
so that other peer knows who's on the other side of the connection.

NB: The queueing starts only when the peer connects for the first time. 
Before that there's no way to know that the peer even exists.

NB2: Actual replay mechanism is not yet implemented. So when connection 
breaks and/or application fails, you'll loose the messages that are "on 
the wire" at the moment. Still, the queued messages will be available 
after the recovery. If there's anyone who wishes to help with 
implementing replay mechanism, you are welcome.

Martin



More information about the zeromq-dev mailing list