[zeromq-dev] durable subscirbers and inproc

Chuck Remes cremes.devlist at mac.com
Wed Feb 23 19:09:42 CET 2011


On Feb 23, 2011, at 11:31 AM, Pieter Hintjens wrote:

> On Wed, Feb 23, 2011 at 6:25 PM, Chuck Remes <cremes.devlist at mac.com> wrote:
> 
>> If you really need reliable delivery of each published message, then the Pub/Sub pattern is not appropriate. You should use the REQ/REP pattern because you'll need to acknowledge each message.
> 
> Even that won't guarantee delivery :-) What if your acknowledgment gets lost?

True. Then you need timeouts and retransmissions. Definitely complicated stuff...

> Plus it adds extraordinary latency to traffic. Depending on your
> application, you would want some kind of asynchronous negative
> acknowledgment, i.e. "I'm missing data X, please (re)send". Possibly
> out of band so the normal pubsub traffic can scale to many clients
> over multicast.

Batching up the missing sequence numbers can be difficult. I like using a "sliding windows" algo for acknowledgement. You essentially end up recreating the sliding windows logic from zmodem, tcp, etc.

> It gets complex. We're looking at this in Ch4 but really it's a
> project by itself.

This would be a *great* reusable project. I think it would have a lot of utility.

cr




More information about the zeromq-dev mailing list