Nir
Nir

Reputation: 261

Why the ZeroMQ publisher binds to two endpoints?

I am new to ZeroMQ and reading now about the publish-subscribe pattern. Looking at the Java example here: http://zguide.zeromq.org/java:wuserver Could someone explain why the publisher has to bind to two endpoints:

Is it mandatory to connect to more than one endpoint for this pattern to work?

Thanks in advance

Upvotes: 0

Views: 37

Answers (1)

jamesdillonharvey
jamesdillonharvey

Reputation: 1042

It's just showing you that you can bind to multiple transports from the same socket. So if you changed your client to subscribe via ipc://weather connection and you were on the same host the communication would be more efficient.

You are correct though the examples give no mention of the dual bind or ipc so it is confusing if you are learning about zeromq.

Upvotes: 1

Related Questions