You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by maccamlc <ma...@ultra-avalon.com> on 2013/09/25 16:35:13 UTC

CamelNetty - No way to get ChannelGroup

Hi,

I migrated from 2.11.1 to 2.12.0 and did not have too many issues, except in
terms of Netty.

My use case is that I need to create a custom ServerPipelineFactory, and
also require access to the ChannelGroup so that I can know when a new
channel is being added and when it is removed.

I also sometimes use the channelGroup to send a message to all clients.

In 2.11.1 it was easy to get access to the ChannelGroup through the
NettyConsumer.

However with the 2.12.0 restructure this has been hidden behind the
NettyServerBootstrapFactory interface.

To get around it for now, I looked at implementing my own
NettyServerBootstrapFactory class, but I could not work out how to do that
and also use a custom ServerPipelineFactory. Therefore the solution I came
up with for now is Reflection! If there is a better way, please let me know
:)

Basically, I am wondering is it possible to modify the
NettyServerBootstrapFactory interface so that the addChannel and
removeChannel methods return the boolean from the channelGroup calls. And
either provide a getter for the channelGroup, or add a writeAllChannels
(bulk write) method interface that does the write method on the
channelGroup?

Thanks
Matt



--
View this message in context: http://camel.465427.n5.nabble.com/CamelNetty-No-way-to-get-ChannelGroup-tp5740204.html
Sent from the Camel - Users mailing list archive at Nabble.com.