title: Netty 4: Channel-EventLoop mapping in the NioEventLoopGroup
body: <p>We have a distributed application that uses Netty (4) for our low level communication stuff. A process in that system execute multiple tasks. Each task contains a set of input and output channels. Channels are permanently assigned to a single EventLoop in Netty. The mapping of Channel to EventLoop happens in round robin fashion in the (Nio)EventLoopGroup. We would like to have more control over this mapping and assign all channels of the same task to the same EventLoop(s). The purpose for this "Channel-EventLoop affinity" is to reduce lock-contention for some specific memory management stuff in the ChannelHandlers. We looked in Netty documentation, but didn´t find anything. Is there a general way to do that in Netty 4? </p>
  
  <p>Another possibility I identified would be to overwrite the "EventExecutor next()" method in the "MultithreadEventExecutorGroup" that implements the round robin channel mapping (I think so at least). Is that a possible way to enforce a different mapping, or do I create undesirable side effects with this hack?</p>
  
  <p>I am grateful for any help!!
  Tobi</p>