Reputation: 1749
Is it a good idea to have multiple PUSH
sockets .bind()
to the same endpoint?
1) If yes, how can multiple PULL
sockets .connect()
to this endpoint and start receiving messages?
Upvotes: 3
Views: 538
Reputation: 1
.bind()
typically grabs the resource ( ref. the port
)The next thing is, that PUSH
Scalable Formal Communication Pattern has a hardwired "internal behaviour" - the API table says:
Outgoing routing strategy Round-robin
so, if there were more than one active transport-class connections to the PUSH
-node archetype, it will cyclically distribute the outgoing messages to the connected, active PULL
-node peers ( in a uniform load-ballancing, literally in the "round-robin" manner ).
However, it is possible to groom the intended outgoing traffic from several PUSH
-ers ( by a local mediator / job-collector ) and expose such uniformly collected flow of jobs ( messages ) under a single "public" PUSH
-ing node to all the external PULL
-er(s) ( all the currently active peers get served on the round-robin basis + decide on using the .setsockopt( ZMQ_IMMEDIATE )
)
Upvotes: 1