[zeromq-dev] a pub with multiple subs starting sequentially

Martin Sustrik sustrik at 250bpm.com
Mon Nov 1 08:33:08 CET 2010


Hi James,
> sub1 connects to the pub at certain point and receives the message
> sub2 connects to the pub five minutes later but it still can receive
> the message without being re-published/sent by the pub.
>
> I am asking this because zmq has an internal queue and am wondering
> when the message will be removed from the queue even this message has
> been read by the first sub.
> I tried to write a simple program but it seems once the message has
> been read by the first sub and the second one can not read the
> message.
>    
There's a separate queue for each subscriber. The queue is created at 
the moment the subscriber connects. Thus there's no way to store 
messages for the subscriber before it connects -- the publisher doesn't 
even know that the consumer in question exists.

Martin



More information about the zeromq-dev mailing list