[zeromq-dev] Is a possible to purge the transmit buffer?
helge.frueh at googlemail.com
Sat May 21 13:05:49 CEST 2011
I am evaluting zeromq right now and I am having a question. In a
pub/sub scenario is there a way to purge the transmit buffer?
Scenario: The pub socket runs continiously on a server. (Durable)
subscribers come and go. So for unavaible subscribers all messages get
queued up in the transmit buffer. In some cases those unavailable
subscribers will never return, so the queue will grow over time. In
order to run not out of memory I put a HWD (like 100) on the
publisher. Now all those 100 slots get filled up with messages to
unavaible subscribers quickly and will never go away. So effectively
the pushlisher will run in emergency mode for the rest of it's life.
Is there any way to remove specific messages off the transmit buffer?
Or purge it completely?
Is it viable to close the socket and build a new one after a certain
amout of time?
Is it possible to query the socket if it's in emergency mode?
More information about the zeromq-dev