Maybe this is a obvious ask, but I'm too new with netty.
Taking a look to HttpChunckAggregator class I see that it's stateful. That make me doubt... given a specific Channel with the following pipeline:
private MyServerHandler handler;
public ChannelPipeline getPipeline() throws Exception {
ChannelPipeline pipeline = pipeline();
pipeline.addLast("decoder",new HttpRequestDecoder());
pipeline.addLast("chunkAggregator",new HttpChunkAggregator(4194304));
pipeline.addLast("encoder",new HttpResponseEncoder());
pipeline.addLast("chunkSeparator",new HttpChunkSeparator(4194304));
pipeline.addLast("handler", handler); //Singleton
return pipeline;
}
and an NIO Netty server, could I get race conditions in case of chunked message and multi-threading?
I see that every new channel creates a new chunk Aggregator but... all the chunk messages will be received in the same channel?