[zeromq-dev] Any way to get info on subscribers?
Pieter Hintjens
ph at imatix.com
Sat Jul 24 10:39:30 CEST 2010
On Sat, Jul 24, 2010 at 9:42 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> This info is in principle not available. 0MQ abstracts from the notion
> of individual connections. All you have is an opaque cloud of peers.
Does that cloud have to be opaque by definition? For example, the
publisher socket knows how many clients have connected to it, and
could report this to the application via getsocketopt...
> All in all, if you need to handle individual connections manually, you
> should go for standard sockets rather than 0MQ.
0MQ sockets do several useful things above TCP sockets:
* transport abstraction
* message queuing
* message bundling
* automatic reconnection
* message framing incl. multipart
* routing patterns
Using TCP sockets forces one to recreate all this work, which is
pretty horrid. If one wants to use a custom routing pattern (e.g. to
do content based routing), then 0MQ might offer "raw" sockets that do
all the work except the routing, and allow the application to do that.
It still adds significant value over TCP.
-Pieter
More information about the zeromq-dev
mailing list