I am not sure what you are asking for honestly. If you want to do this just decode the message by yourself and write the same ´ByteBuf´ to multiple channels. Just be sure you correctly retain and duplicate it.
> On 18. Oct 2017, at 16:48, [email protected] wrote: > > Imagine the following scenario: > There are multiple clients and same message is dispatched to all of them. Now > the message can be a single string, or, it can be a more complex object. > Since the MessageToByteEncoder.encode's output will result in the same byte > buffer each and every time, why not actually call the operation just once and > then write that out buffer to each channel. > > This is important not only for sparing some system resource. Also imagine I > have an message pool that I reuse, so if I decode particular message once, I > know when I can "release" it. > Otherwise I'll need to trace whether it has been written to all receiving > channels and "release" then. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Netty discussions" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/netty/e09ed85c-4117-48f3-80d4-34a7941dad3a%40googlegroups.com > > <https://groups.google.com/d/msgid/netty/e09ed85c-4117-48f3-80d4-34a7941dad3a%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Netty discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/netty/F037C280-982D-42EF-9B32-529FCEF8BD27%40googlemail.com. For more options, visit https://groups.google.com/d/optout.
