[zeromq-dev] exiting without missing messages

Pieter Hintjens ph at imatix.com
Sat Aug 20 19:06:08 CEST 2011


On Sat, Aug 20, 2011 at 5:57 PM, Mathijs Kwik <bluescreen303 at gmail.com> wrote:

> I fail to see how to implement these explicit "bye bye" messages.
> I can get a worker to send such a message to the ventilator, I just
> don't have a clue on what the ventilator should do when it receives a
> byebye.

Study the LRU queue pattern and code, it's the basis for all custom
routing. The ventilator (ROUTER) keeps a table of all active workers.
When a worker decides to go away, it tells the ventilator, which
removes it from its table.

IMO you'll find alternative patterns that work better, such as
prioritising workers and sending to certain ahead of others, while
keeping them all connected all the time.

The best approach IMO is to start with the LRU queue, learn it, and
then extend it step by step until you have what works for you.

-Pieter



More information about the zeromq-dev mailing list