[ 
https://issues.apache.org/jira/browse/CAMEL-9276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14991165#comment-14991165
 ] 

Darshan Sundaresh commented on CAMEL-9276:
------------------------------------------

The problem seems to be because of the channelFuture.awaitUninterruptibly() for 
the bind in startServerBootstrap() of SingleTCPNettyServerBootstrapFactory. I 
was mistaken in thinking that it is allowing you to bind to the same address, 
while what is actually happening is because of the awaitUniterruptibly the bind 
exception is being discarded. The netty documentation states "ChannelFuture 
awaitUninterruptibly()

Waits for this future to be completed without interruption. This method catches 
an InterruptedException and discards it silently". 

Perhaps this needs to be changed to syncUninterruptibly() ??

> Netty4 component allows multiple consumers to bind to the same {host}:{port}
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-9276
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9276
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-netty4
>         Environment: Verified and confirm same behavior on OSX and Windows
>            Reporter: Darshan Sundaresh
>
> I have a netty4 tcp consumer on the from route i am able to start multiple 
> instances of this route and there is no "address already in use/ bind 
> exception " being raised by camel, changing the "reuseAddress" to "false" 
> doesnt seem to make a difference.
> Sample config
> <from 
> uri="netty4:tcp://0.0.0.0:3010?sync=false&amp;textline=true&amp;reuseAddress=false"/>
> <to uri="log://org.dx.com?level=DEBUG"/>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to