Netty Client concurrency
Liuxianning
liuxianning at huawei.com
Thu Oct 20 22:25:01 EDT 2011
Hi Guys
There are 2 Modules in my project. I used Netty as channel between them.I used the long connection. In the pipelinefactory of clientside module, the code as follows
public ChannelPipeline getPipeline()
throws Exception
{
ChannelPipeline pipeline = Channels.pipeline();
pipeline.addLast("decoder", new MessageDecoder());
pipeline.addLast("ThreadPoolHandler", executionHandler);
pipeline.addLast("handler", new ClientHandler());
return pipeline;
}
the code get response as follows:
ClientHandler handler = channel.getPipeline().get(ClientHandler.class);
return handler.getResponse(request);
My problem is:
1. is there only one ClientHandler instance even I used ExecutionHandler?
2. When there is multi-thread send request, all the get response is blocked in the ClientHandler, How should i improve the client concurrency?
Any suggestion is many thanks.
Sincerely
Liuxianning.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20111021/8f5e40d1/attachment.html
More information about the netty-users
mailing list