How can I use a thread pool to off-load a processing from a Netty handler -


i have server proxy implemented netty 4.0.27 support set of custom protocols. 1 of these protocols processes results server simple two-handler pipeline before returning messages client: custom lengthfieldbasedframedecoder followed handler non-trivial processing of each message/frame. proxy stress tested on high cpu/core server , i’d take advantage of these cores passing messages handler thread pool processing, retrieving processed message, , sending them client (in right order). not see how within netty handler due being callback in nature.

any thoughts?

you can pass eventexecutorgroup while adding handler pipeline:

pipeline.addlast(group, "handler", new mybusinesslogichandler()); 

see building pipeline section @ http://netty.io/4.0/api/io/netty/channel/channelpipeline.html


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -