You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Leomar <le...@finsterblitz.de> on 2015/11/13 14:08:29 UTC

Get Socket Status of Netty4 Route

Hi there,

i`m currently working on a project with several Netty4 routes to several
servers. 
For an overview i want to show all connected sockets. 

Is there a possibility to get all socket connections for the routes ? 
Or capture connection loss events etc.

Greetings, 
Leomar



--
View this message in context: http://camel.465427.n5.nabble.com/Get-Socket-Status-of-Netty4-Route-tp5773807.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Get Socket Status of Netty4 Route

Posted by Leomar <le...@finsterblitz.de>.
Hi there,

i found a suitable solution for my usecase.

In the netty 4 endpoint there is a encoder option to add ChannelHander to
the endpoint.

So i wrote a io.netty.channel.ChannelDuplexHandler extension.

This Handler will now be called in cased of connection events for the Netty
channel.

Using these calls you can react on connection state changes of the netty
channel.


Greetings,
Leomar



--
View this message in context: http://camel.465427.n5.nabble.com/Get-Socket-Status-of-Netty4-Route-tp5773807p5777923.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Get Socket Status of Netty4 Route

Posted by Claus Ibsen <cl...@gmail.com>.
Some of these are set as headers on the message, so you can try to see
if you can find one of them that can get you the channel
https://github.com/apache/camel/blob/master/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConstants.java

On Thu, Nov 19, 2015 at 8:38 AM, Leomar <le...@finsterblitz.de> wrote:
> Hi there,
>
> may there be any chance to get the netty Channel if i have an instance of
> the route ?
>
>
> Thanks,
> Leomar
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Get-Socket-Status-of-Netty4-Route-tp5773807p5774096.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Get Socket Status of Netty4 Route

Posted by Leomar <le...@finsterblitz.de>.
Hi there,

may there be any chance to get the netty Channel if i have an instance of
the route ? 


Thanks, 
Leomar



--
View this message in context: http://camel.465427.n5.nabble.com/Get-Socket-Status-of-Netty4-Route-tp5773807p5774096.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Get Socket Status of Netty4 Route

Posted by Leomar <le...@finsterblitz.de>.
the producer definition is e.g. 

netty4:tcp://127.0.0.1:4021?clientMode=false&textline=false&?decoders=#plcDelimiterDecoder4&reuseAddress=false&sync=false



--
View this message in context: http://camel.465427.n5.nabble.com/Get-Socket-Status-of-Netty4-Route-tp5773807p5773809.html
Sent from the Camel - Users mailing list archive at Nabble.com.