[zeromq-dev] Identities & PUB/SUB

Martin Sustrik sustrik at 250bpm.com
Tue Apr 5 10:44:40 CEST 2011


Hi Paul,

>> Identities can be used with PUB/SUB to improve reliability of message
>> distribution. However, the messages that are on flight during the
>> disconnection/failure are dropped anyway. Moreover, if failure lasts for
>> long enough, HWM on publisher is ultimately reached and new messages are
>> discarded. Which makes the whole identity thing in PUB/SUB more or less
>> useless.
>>
> Well, same applies to XREP/XREQ, and for PUSH/PULL. Sometimes
> identities can assist routing, but it's quite hackish and rare solution.
> So may be drop the whole identities feature?

I would love to.

The problem is that people are already using XREP socket as a router, ie.

1. You have 3 apps you want to send arbitrary messages to.
2. You create an XREQ socket in each of them. Then you set the 
identities on those socket to "A", "B" and "C" respectively.
3. The sender application creates an XREP socket and connects to those 
three applications. When you want to send message to first app, you 
simply prepend the message by "A", if you want to send it to the second 
app, you prepend it by "B" etc.

Thus the feature cannot be removed from at least from XREQ socket 
without breaking existing apps.

However, it's still possible to remove it from PUSH/PULL sockets in 
addition to PUB/SUB. How do people feel about that?

Martin



More information about the zeromq-dev mailing list