[zeromq-dev] Pub/Sub over PGM with many topics

Michel Pelletier pelletier.michel at gmail.com
Tue May 29 20:37:18 CEST 2012


On Sun, May 27, 2012 at 2:44 PM, Steven McCoy <steven.mccoy at miru.hk> wrote:
> From a performance and convenience viewpoint it is unfortunate that a
> closure cannot be provided so one does not have to perform an additional map
> search in addition to the internal ZeroMQ search.  The pattern would follow
> epoll then.
>
> The socket paradigm is a bit inconvenient to fit all these requirements
> into.  This would require ZMQ_SUBSCRIBE take a struct value and not just a
> string.

I like this idea, it would be nice to know, as you point out, which
subscription a message matched without having to do your own search.
Maybe an interesting b/w compatible change would be to add another
recv()-like method to SUB that returned a struct of the message and
also the subscription it matched.  This would keep ZMQ_SUBSCRIBE
simple and not break any existing code.

-Michel



More information about the zeromq-dev mailing list