problem description
when broadcasting with the ChannelGroup packet of netty, if there are multiple groups, how should the EventExecutor in the parameter be set when initializing ChannelGroup? Is it a direct GlobalEventExecutor.INSTANCE to make all ChannelGroup share the same thing? Or is there another new for each group, which class should be used if you want to assign a different one to each group?
the environmental background of the problems and what methods you have tried
is writing an im application that wants to send different messages to different groups with a ChannelGroup corresponding to a group.
but there is no information about what to do when creating multiple ChannelGroup.
most of them are like this, just create one, and then broadcast it directly to all connections
private static ChannelGroup channelGroup = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);
but what if there are multiple groups?
or is it something like the following to maintain the relationship between a group and a connection, and then manually traverse a group to write messages to all channel in it during the broadcast?
for(Channel ch:map.get(groupid)){
ch.writeAndFlush(msg)
}