[nanomsg] Re: does nanomsg support multi producer in pub-sub mode?

  • From: "????????" <139250065@xxxxxx>
  • To: "nanomsg" <nanomsg@xxxxxxxxxxxxx>
  • Date: Wed, 30 Dec 2015 07:26:46 +0800

Dear Garrett:
Thanks for your kindly support! I have some questions more:
1. Does one producer socket can send message to multi topic?
2. Does one producer socket can broadcast message to all topic?
3. Does one comsumer socket can receive messages from multi topic?
4. Does one comsumer socket can receive broadcast message?
5. Can one socket be producer and comsumer socket at same time?
6. Would you please give some simple demo for multi producer, multi comsuer,
multi topic?


With best regards
Daniel




------------------ Original ------------------
From: "Garrett D'Amore";<garrett@xxxxxxxxxx>;
Date: Wed, Dec 30, 2015 02:11 AM
To: "nanomsg@xxxxxxxxxxxxx"<nanomsg@xxxxxxxxxxxxx>;

Subject: [nanomsg] Re: does nanomsg support multi producer in pub-sub mode?



Because nanomsg uses TCP, you can only have one process ??listening?? (i.e.
doing TCP accept.) This can indeed be the subscriber, as the role of
subscriber/publisher is orthogonal to the TCP client/server relationship. That
said, such a use case (having the subscriber be the one doing the
listen/bind/accept) is unconventional, but it will work.

On Tue, Dec 29, 2015 at 7:25 AM, ???????? <139250065@xxxxxx> wrote:
Dear Garrett:
Sorry! I didn't speak the question clearly. My real question is: Can multi
process(producer) post messages to same url(same message queue)? If can, should
each producer run nn_bind function?
With best regards
Daniel




------------------ ???????? ------------------
??????: "Garrett D'Amore";<garrett@xxxxxxxxxx>;
????????: 2015??12??29??(??????) ????11:15
??????: "nanomsg"<nanomsg@xxxxxxxxxxxxx>;

????: [nanomsg] Re: does nanomsg support multi producer in pub-sub mode?



Yes. You can connect to multiple publishers and since the subscription is
merely a client side filter you will see the appropriate messages from both
subscribers.

Sent from my iPhone

On Dec 29, 2015, at 2:19 AM, ???????? <139250065@xxxxxx> wrote:

Dear all:
does nanomsg support multi producer in pub-sub mode?

with best regards
daniel

Other related posts: