[zeromq-dev] Event-driven publish-subscribe model

Ian Barber ian.barber at gmail.com
Mon Mar 26 18:08:37 CEST 2012

On Mon, Mar 26, 2012 at 4:42 PM, Chuck Remes <lists at chuckremes.com> wrote:

> That is a far better mechanism than the built-in HWM mechanism. Since it
> isn't built in to the library, you would have to add this logic at the
> application level. Since it *requires* two-way communication between the
> client and server, you cannot use the PUB/SUB sockets. You would need to
> use DEALER/ROUTER sockets to handle this communication.
> Yes, this will be a little more work but it is necessary for the kind of
> flexibility that your #2 issue requires.

I think you can still use PUB/SUB here, if you're doing at-least-one kind
of flow control you just need credit from *someone*, not everyone, and you
could do that with a simple pull or rep socket - as soon as anyone adds
credit, then you push the message out the pub. This is actually pretty much
just a send-on-ack sliding window, but with multiple clients. Doesn't need
to be a library level, that's an easy bit of code in application land. By
doing the checking in app land you also get the opportunity to be clever -
for example, rolling up messages if they supersede each other, that kind of

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120326/c410f227/attachment.htm>

More information about the zeromq-dev mailing list