[zeromq-dev] What is the best 0MQ socket configuration for an event server?

Martin Sustrik sustrik at 250bpm.com
Tue Aug 31 20:11:35 CEST 2010

Hi John,

> I have a need that does not seem to have a natural solution in 0MQ, but
> maybe I am missing something.
> Here’re the basics:
>    1. There will be a Server process (with a “published” address)
>    2. There will be Client processes that may come and go concurrently
>       from anywhere on the network
>    3. Clients will “subscribe” to certain “events” (the events are
>       client-specific)
>    4. A client’s events will occur over a “long” period of time (minutes
>       or longer)
>    5. Publishing all events to all clients and utilizing client-side
>       filtering is not suitable due the network burden
>    6. I would like a solution than can handle heavy loads of event
>       traffic (1000+ messages/sec) if needed
> One solution I can imagine is if 0MQ supports “dynamically assigned” PUB
> sockets where the server can request a new PUB socket from 0MQ and let
> the Port# be auto assigned and query-able. With this, the subscription
> reply can carry the new Port# which the client can then “listen to”.
> Any thoughts on this from you who are more versed in 0MQ designs?

The only real solution is moving subscriptions up the distribution tree 
so only messages actually needed are not sent to the particular branch.

Jon Dyte started some development to (check the recent discussions on 
the mailing list) achieve this, but of course the more people involved, 
the sooner any outcome...


More information about the zeromq-dev mailing list