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

Quinn Stevenson commented on CAMEL-10242:
-----------------------------------------

Adding support for the idleTimeout shouldn't be much of a problem for the 
MllpTcpServerConsumer, but the MllpTcpClientProducer is more involved.

The MllpTcpServerConsumer already has a polling thread looking for incoming 
data, so it will be easy enough to add a check for receiving something within a 
given timeout.  The granularity will be limited to multiples of the 
receiveTimout, but that shouldn't be too much of an issue.

The MllpTcpClientProducer doesn't create any threads of it's own, so I'd need 
to add a thread in order to timeout a connection.  I'm not sure we actually 
need the timeout for the MllpTcpClientProducer anyway, since the route can 
always set the CamelMllpCloseConnectionBeforeSend or 
CamelMllpResetConnectionBeforeSend exchange property and then "send" a dummy 
message - the connection will be closed/reset at that time.  This makes more 
sense to me because the route will have a better idea what a "timeout" means 
for a MllpTcpClientProducer.

My preference would be to add support for and idleTimeout to the 
MllpTcpServerConsumer, but leave the MllpTcpClientProducer alone.  

Thoughts?

> camel-mllp - Enhance Camel to support idleTimeout to avoid network resource 
> wastage due to leak in caller code
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-10242
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10242
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mllp
>    Affects Versions: 2.17.3
>            Reporter: Venkateswara Rao Desu
>            Assignee: Quinn Stevenson
>             Fix For: Future
>
>
> For a good client and Server , idle timeout is not required.
> But when client has bugs which open socket but not close, then server would 
> have ESTABLISHED connections pilled up. Which end up restarting the process 
> or killing sockets manually.
> To avoid this we should have idleTimeout for all mllp connections.
> This is in reference to : 
> https://github.com/hqstevenson/camel-mllp/issues/14#issuecomment-238911254



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

Reply via email to