[zeromq-dev] Architectural question: REP/REP vs. PUB/SUB

Pieter Hintjens ph at imatix.com
Tue Aug 31 10:26:16 CEST 2010

On Mon, Aug 30, 2010 at 10:30 PM, gonzalo diethelm <gdiethelm at dcv.cl> wrote:

> 2) Is it "safe" to do PUB/SUB over a "tcp://" endpoint, or should I be
> looking at one of the multicast protocols? Does it simply come down to
> network bandwidth usage? Is there any case when tcp would be preferable
> for a PUB/SUB socket?

TCP is much simpler to use and unless you are doing high volumes with
filtering on messages, there's no point in using multicast.  Put it
like this: start with TCP and look at multicast if you have a network
bandwidth issue.

> 3) I think I can take care of any timing issues (such as delays
> connecting the PUB/SUB sockets) if my client first sends a "client
> coming up" message down the PUSH socket and waits until it gets a
> "everything is ready for you" message on the SUB socket (probably with a
> UUID to pair the two). Right?



More information about the zeromq-dev mailing list