[zeromq-dev] Question about multiple Pub/Sub sockets

gonzalo diethelm gdiethelm at dcv.cl
Tue Mar 9 13:22:52 CET 2010

> Yes. You are right. If there are multiple senders and multiple
> you have to have a forwarder process in the middle otherwise you would
> have to manually setup all the connections between senders and

Ok. Any thoughts about this forwarder being a single point of failure?

> A side note: You may want to have "event types" managed automatically,
> guarantee the ordering etc. In such a case use a single PUB socket and
> tag the events by event type. For instance, message containing event
> type A may look something like this:
> A|my-event-specific-data
> On the SUB side you can subscribe for a particular message types:
> zmq_setsockopt (s, ZMQ_SUBSCRIBE, "A|", 2);
> zmq_setsockopt (s, ZMQ_SUBSCRIBE, "B|", 2);

Perfect, this was my plan to begin with. Quick question: does it matter
if the payload after the event tag contains binary characters? I am
using Google Protocol Buffers to marshal my data, so the payload could
contain anything, but I will have a fixed-length printable event tag
(such as your "A|", "B|", etc) prepended to the payload. Will it work,
in the sense that 0MQ will match only on those first N printable bytes
at the beginning?

Gonzalo Diethelm

Declaración de confidencialidad: Este Mensaje esta destinado para
el uso de la o las personas o entidades a quien ha sido dirigido y
puede contener información reservada y confidencial que no puede
ser divulgada, difundida, ni aprovechada en forma alguna. El uso no
autorizado de la información contenida en este correo podrá ser
sancionado de conformidad con la ley chilena. 
Si usted ha recibido este correo electrónico por error, le pedimos
eliminarlo junto con los archivos adjuntos y avisar inmediatamente
al remitente, respondiendo este mensaje. 

"Before printing this e-mail think if is really necesary".
Disclosure: This Message is to be used by the individual,
individuals or entities that it is addressed to and may include
private and confidential information that may not be disclosed,
made public nor used in any way at all. Unauthorized use of the
information in this electronic mail message may be subject to the
penalties set forth by Chilean law. 
If you have received this electronic mail message in error, we ask
you to destroy the message and its attached file(s) and to
immediately notify the sender by answering this message. 

More information about the zeromq-dev mailing list