Can Netty process a single pipeline with multiple threads?

315 Views Asked by At

I have a Netty 4 application that is receiving messages at high throughput using a single network connection (or to be precise, a single IP multicast group), so processing of all channel handlers in the pipeline is basically single-threaded.

Is there a way to configure Netty to parallelize processing so that more than 1 core gets used? I'm thinking of the "pipelining pattern" of multi-threading aka synchronous concurrency. Is something like that built-in - or would I have to implement this myself, off the Netty pipeline?

1

There are 1 best solutions below

2
On

You can add different handlers with different EventLoopGroups to the pipeline. This way you can offload to different threads. That said you may need to be careful in terms of ordering (depending on the protocol)