[zeromq-dev] PUSH/PULL HWM documentation

Martin Sustrik sustrik at 250bpm.com
Thu Oct 6 12:38:38 CEST 2011


On 10/05/2011 06:37 PM, James Cipar wrote:
> I think I'm confused about how PUSH/PULL sockets work.  Specifically
> about how messages are routed to different PULL sockets connected to
> a single PUSH.  My impression with 0MQ PUSH/PULL (based on the docs
> and my test program that I sent out) was that it basically does this
> internally.  Every consumer has a buffer.  When the sender gets a
> message to send, it picks the first consumer (in a round-robin
> fashion) whose buffer is not full.  If all consumer's buffers are
> full, the sender blocks until one of them is no longer full.  Is this
> incorrect?

Yes. It's correct.

However, keep in mind that there are 4 buffers on the way from the 
sender to the receiver:

1. Sender's 0MQ queue limited to HWM
2. Sender's TCP buffer limited by SO_SNDBUF
3. Receiver's TCP buffer limited by SO_RCVBUF
4. Receiver's 0MQ queue limited by HWM

Martin



More information about the zeromq-dev mailing list