Re: [zeromq-dev] Many to many

2013-02-17 Thread Lee Sylvester
That's wonderful, thank you. But, what about across servers? Wouldn't I need to rely on TCP? If so, can they also do this? Thanks, Lee Sent from my iPhone On 17 Feb 2013, at 07:48, Whitney Jackson whjack...@gmail.com wrote: I'm guessing the subs cannot connect to many? Guess again :)

Re: [zeromq-dev] Many to many

2013-02-17 Thread Lee Sylvester
Thank you, Justin. I had heard rumours, but its almost unfathomable :-D Lee Sent from my iPhone On 17 Feb 2013, at 07:33, Justin Karneges jus...@affinix.com wrote: Bind vs connect is independent of socket type. You can bind a SUB socket and connect many PUB sockets to it. So, you could

Re: [zeromq-dev] Many to many

2013-02-17 Thread Whitney Jackson
Yeah sure. It'll work just fine with tcp endpoints. On Sun, Feb 17, 2013 at 2:11 AM, Lee Sylvester lee.sylves...@gmail.comwrote: That's wonderful, thank you. But, what about across servers? Wouldn't I need to rely on TCP? If so, can they also do this? Thanks, Lee Sent from my iPhone On

Re: [zeromq-dev] Many to many

2013-02-17 Thread Lee Sylvester
Thank you, Whitney, you've made my day. I've been contemplating this part of my cloud over and over for days and was loath to do something complex when currently it's very simple and sleek. I can see ZMQ is a perfect fit :-D Regards, Lee Sent from my iPhone On 17 Feb 2013, at 08:15, Whitney

Re: [zeromq-dev] Many to many

2013-02-16 Thread Whitney Jackson
Is it possible for a sub socket to bind to multiple pub sockets? Yes. You can call bind and/or connect on a socket as many times at you like. If so, where is there an example of this? Here's an example from the guide where a pub socket is bound to multiple endpoints:

Re: [zeromq-dev] Many to many

2013-02-16 Thread Lee Sylvester
Thank you for your reply, Witney, but I need it the other way. I need a sub socket to be connected to multiple pub endpoints... This is because every instance will have a single publisher, telling all who is interested about events, but that same service will want to list to an arbitrary number

Re: [zeromq-dev] Many to many

2013-02-16 Thread Justin Karneges
Bind vs connect is independent of socket type. You can bind a SUB socket and connect many PUB sockets to it. So, you could have each service bind a PUB socket and a SUB socket, and then connect each to all other services' SUB sockets and PUB sockets respectively. On Sunday, February 17, 2013

Re: [zeromq-dev] Many to many

2013-02-16 Thread Whitney Jackson
I'm guessing the subs cannot connect to many? Guess again :) Here's a python example: # start sub.py import zmq c = zmq.Context() s = c.socket(zmq.SUB) s.setsockopt(zmq.SUBSCRIBE, '') s.connect('ipc://ep1') s.connect('ipc://ep2') while True: m = s.recv() print m print '' # end