[zeromq-dev] Important: backward incompatible changes for 0MQ/3.0!

Pieter Hintjens ph at imatix.com
Tue Apr 5 00:03:52 CEST 2011


2011/4/4 Paul Colomiets <tailhook at yandex.ua>:

This is a great thread :)

>> 3. Pipeline (push/pull). This is the interesting case. The communication
>> is uni-directional, meaning that we can't timeout and resend while at
>> the same time we want every message to be delivered.

JMS defines three levels of acks for this use case:

* when message is received by IO layer
* when message is delivered by IO layer to application
* when message is processed by application

The only real failure scenario is application crashes, and thus only
the last model makes any sense. However it requires explicit ACKing by
the application, it cannot be done by the socket alone.

Once you start redelivering messages you need to handle toxic messages
(i.e. which will crash every recipient) by only resending N times at
most.

I'd see this as a pattern to be built on top of libzmq, not into its sockets.

What would be rather more useful, for pipeline, and pubsub, is simple
node presence synchronization. Very hard to do on top, and 0MQ has the
knowledge. E.g. I want my ventilator to start pushing messages only when
there are 3+ sinks. I want to start publishing only when I have at
least 1 subscriber (over TCP, yes, of course).

-Pieter



More information about the zeromq-dev mailing list