[zeromq-dev] Expected behavior of P2P Sockets?

Jianhua Cao cao.jianhua at gmail.com
Sat Feb 20 07:55:12 CET 2010


http://gist.github.com/309551

First run  in a terminal. (it starts pumping messages out but no receiver)
> ./test3 connect

Then in another terminal. (it receives one message then quit)
>./test3 bind
0
Then again
>./test3 bind
57831
And again
>./test3 bind
114178

BTW any way to disable pgm debug prints?
(process:2385): Pgm-DEBUG: Using TSC timer.
(process:2385): Pgm-DEBUG: Using usleep() sleep.



On Sat, Feb 20, 2010 at 12:06 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> Jianhua Cao wrote:
>>
>> Noticed two things when trying out P2P Sockets when pumping messages
>> to a P2P socket without a receiver in the other side,
>> 1.  early messages will be dropped.
>
> No, this shouldn't happen. I have a look tomorrow.
>
>> 2.  memory consumption shoots up.
>
> Yes. The messages you are sending are queued so that they can be sent once
> the peer becomes available. That's expected behaviour.
>
> Martin
>



-- 
Jianhua



More information about the zeromq-dev mailing list