在 2012-6-8,下午8:37, Pieter Hintjens 写道:

> On Fri, Jun 8, 2012 at 12:10 AM, kaka chen <[email protected]> wrote:
> 
>> Sorry, got it, I found it should share one context in all client threads,
>> then will be fast again. I think the problem is the context is very heavy,
>> cost many resources, am I right?
> 
> No, the problem is that REQ-REP is fully synchronous so you are doing
> a round-trip for each message.
> 
> Please read the Guide and follow the examples for doing asynchronous
> request-reply using ROUTER/DEALER sockets.
> 
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

I know this is a fully synchronous mode. I use this mode to test the 
TPS(transaction per seconds), send a request until recv reply then send next 
request, but I found if I didn't share context with all client threads, it will 
be slow, thanks!

-Kaka Chen

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to