Re-using ClientBootstrap… but why?

As long as you share the same EventLoopGroup with different ClientBootstraps you will use the EventLoops from the same pool and you are fine. Nothing wrong with creating multiple ClientBoostraps as connection just calls next() on the EventLoopGroup anyway:

Note that channelInitializer may be called multiple times because we may try to race IPv4 and IPv6 connections simultaneously and setup a full channel for each.

1 Like