[zeromq-dev] Slow consumer/subscriber, only get last message.
20261142 at student.uwa.edu.au
Tue May 10 04:12:00 CEST 2011
I'm using a PUB/SUB model to share information between a few processes
(using 0MQ of course). However some of the consumers are much slower than
others. In fact one is slower than the minimum publisher speed, which causes
it to queue-up lots of messages. I can't speed up the consumer at all, so I
was hoping to have it drop messages when it all becomes too much for it. It
looks like by default this will happen when I have hit the high water mark.
However I get the impression that this drops any new messages.
What I would like to happen is to drop all the messages in the consumer but
the last one. As this consumer only needs to show information to humans, it
only really needs the last message published. Of course to make it more
difficult this consumer is attached to multiple publishers. So what I want
is for it to keep the last message of each "filter" type for me to read, and
the ones before that I don't care about.
Any ideas?. I could introduce another thread to just read 0MQ messages, but
it seems like a waste.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev