[zeromq-dev] questions about sub/pub socket (resend)

Guo, Yanchao Yanchao.Guo at sac.com
Tue Feb 2 09:29:46 CET 2010

Not sure what happend as this created some "No Subject" thread. Try to send for the third time

-----Original Message-----
From: Guo, Yanchao
Sent: Tue 2/2/2010 3:28 AM
To: zeromq-dev at lists.zeromq.org
Subject: questions about sub/pub socket  (resend)

Hi Martin:
I found that if I setup up socket in this way:

m_Context = new context_t(1,1);
m_Socket = new socket_t(*m_Context, ZMQ_PUB);

and then send message through this socket, then the message will be queued in the socket, in a sense that if the SUB socket (which binds to the port) starts later then this PUB socket, the SUB socket is able to receive all the historical data.

This behavior is different from a PUB socket which bind to a port, in that case the is no historical data kept.

Is it possible to make the PUB/connecting socket not caching the data?

Also, is there a onInit method to notify the server of newly established connection?


DISCLAIMER: This e-mail message and any attachments are intended solely for the use of the individual or entity to which it is addressed and may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and permanently delete this message and any attachments. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100202/46983452/attachment.htm>

More information about the zeromq-dev mailing list