[zeromq-dev] Multiple PUB -> one SUB?
Ian Barber
ian.barber at gmail.com
Mon Dec 12 20:46:16 CET 2011
On Mon, Dec 12, 2011 at 7:27 PM, Mikko Koppanen <mikko.koppanen at gmail.com>wrote:
> On Mon, Dec 12, 2011 at 6:30 PM, Andrei Zmievski <andrei at zmievski.org>
> wrote:
> > I actually don't need to do subscription filtering, but I also don't
> want to
> > block on HWM, so that's why I was thinking of PUB-SUB model.
>
>
> Hi,
>
> pub-sub will work for this scenario. If the Java process is something
> that can be distributed you could explore PUSH (clients) and PULL
> (server) for high-availability and splitting the load. You can still
> do non-blocking writes or polling with timeout with PUSH.
The other benefit of using PUB/SUB is that you can connect to multiple SUBs
if need be, and they can select messages (or get all). This is the reason
mongrel2 uses it. Like Mikko says, if you use the noblock then you can just
drop messages in HWM state manually without much difficulty, and you'll
benefit from knowing that's happened (unlike in the PUBSUB case) - but if
you connected multiple PULL sockets, the messages would load balance
between them.
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111212/97ee9204/attachment.htm>
More information about the zeromq-dev
mailing list