[zeromq-dev] ZMQ 3.x: Receiving several times the same message

Emmanuel TAUREL taurel at esrf.fr
Mon Sep 12 12:57:06 CEST 2011


Hello all,

I am using ZMQ 3.x (from GitHub) on a Ubuntu 10.10 box (32 bits).
I am using the PUB/SUB pattern.

The code in my subscriber process is doing:

- Create the ZMQ context
- Create a SUB socket
- Connect to the publisher
- Subscribe with string STR1
- Receive some multipart messages using zmq::poll()
- Unsubscribe STR1
- Connect to the same publisher (Same endpoint)
- Subscribe with the same string: STR1

And then, I receive messages sent by the publisher twice (still using 
zmq::poll())
If I remove the second connect, I get the message only once.

Am I doing something wrong / unsupported if I connect / subscribe the 
same socket several times to the same publisher?

Thank's for your answers

Emmanuel Taurel




More information about the zeromq-dev mailing list