Hi,

I am using a XPUB socket to distribute data between three sites in several 
channels. For our application, it would be better if the socket would drop old 
messages when it reaches the HWM. I searched the mailing list and found some 
old questions asking about this, and an answer that it has been requested but 
never implemented, although it should be fairly easy. So I had a quick look at 
the source code, but I don't think that it is as easy as expected.

The internal pipe is implemented with the assumption that each end is not 
modified concurrently, i.e. there are never two concurrent writes are reads. 
Concurrent read and write is of course expected. From what I see, this makes it 
hard to drop the oldest message in the queue because the queue has to be 
modified from the writer thread. Does anybody have an idea on how to do this? I 
think it could be possible to send to a command to the writer thread to drop a 
message, but that does not sound very efficient. If somebody could point me to 
the right direction I can pick up from there.

Cheers,
Jens

--
Jens Auer | CGI | Software-Engineer
CGI (Germany) GmbH & Co. KG
Rheinstraße 95 | 64295 Darmstadt | Germany
T: +49 6151 36860 154
[email protected]<mailto:[email protected]>
Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie unter 
de.cgi.com/pflichtangaben<http://de.cgi.com/pflichtangaben>.

CONFIDENTIALITY NOTICE: Proprietary/Confidential information belonging to CGI 
Group Inc. and its affiliates may be contained in this message. If you are not 
a recipient indicated or intended in this message (or responsible for delivery 
of this message to such person), or you think for any reason that this message 
may have been addressed to you in error, you may not use or copy or deliver 
this message to anyone else. In such case, you should destroy this message and 
are asked to notify the sender by reply e-mail.
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to