[zeromq-dev] not binging to all LISTEN port
Mohit Anchlia
mohitanchlia at gmail.com
Tue Sep 23 18:53:59 CEST 2014
Thanks! Is using so many sockets essentially a bad idea? How and when do I
know that I am saturating one dealer/router?
On Tue, Sep 23, 2014 at 9:47 AM, Bob Clarke <optionguy71 at gmail.com> wrote:
> I think his main point is, Why are you using so many sockets? A single
> ZeroMQ socket can handle a tremendous volume of messages. Your brief code
> sample shows a REP socket, so can I guess that the other is a REQUEST?
> Switching to DEALER/ROUTER would get you the request/reply pattern you seem
> to want, but will allow asynchronous behavior, and could be done on a lot
> fewer than 22 sockets.
>
> Bob
>
> On Tue, Sep 23, 2014 at 10:41 AM, Mohit Anchlia <mohitanchlia at gmail.com>
> wrote:
>
>> Can you please explain more about what is it that I am doing wrong? I am
>> just trying to create many multithreaded workers for the incoming requests.
>> On Tue, Sep 23, 2014 at 3:48 AM, Pieter Hintjens <ph at imatix.com> wrote:
>>
>>> I'm not going to ask why you are trying to do something so... wrong.
>>> Presumably you have good reasons.
>>>
>>> Disregarding netstat, can clients connect on the other ports, or not?
>>>
>>> On Tue, Sep 23, 2014 at 12:25 AM, Mohit Anchlia <mohitanchlia at gmail.com>
>>> wrote:
>>> > I have a code that binds zeromq socket to 20-22 sockets, however when
>>> I look
>>> > at netstat it is only binding to 5 sockets.
>>> >
>>> > The log message is being printed 22 times with 22 unique port numbers
>>> and
>>> > there doesn't seem to be any error logged or exception throws either.
>>> I am
>>> > trying to understand why I am not seeing the socket on 22 port?
>>> >
>>> > ZMQ.Socket socket = context.socket(ZMQ.REP);
>>> >
>>> > socket.bind("tcp://*:" + port);
>>> >
>>> > log.info("Server bind port=" + port);
>>> >
>>> >
>>> > _______________________________________________
>>> > zeromq-dev mailing list
>>> > zeromq-dev at lists.zeromq.org
>>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>> >
>>> _______________________________________________
>>> zeromq-dev mailing list
>>> zeromq-dev at lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>>
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140923/3f32d5cd/attachment.htm>
More information about the zeromq-dev
mailing list