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

Jun Rao commented on KAFKA-1282:
--------------------------------

Nicu,

On #2, I wasn't worried about any performance optimization. My concern is 
mostly on testing and ease of understanding. Since removeEldestEntry is only 
called on update, you can't test the logic on a single connection to the 
broker. It's a bit weird that if there is only a single idle connection, that 
connection is never killed. But as soon as a second connection is added, the 
idle connection will be killed. For the user's perspective, it's simpler to 
understand how idle connections are killed if they are not tied to # of 
connection.

Also, could you explain how you fixed #1 in the latest patch? It wasn't obvious 
to me.

> Disconnect idle socket connection in Selector
> ---------------------------------------------
>
>                 Key: KAFKA-1282
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1282
>             Project: Kafka
>          Issue Type: Bug
>          Components: producer 
>    Affects Versions: 0.8.2
>            Reporter: Jun Rao
>            Assignee: nicu marasoiu
>              Labels: newbie++
>             Fix For: 0.9.0
>
>         Attachments: 
> KAFKA-1282_Disconnect_idle_socket_connection_in_Selector.patch, 
> idleDisconnect.patch
>
>
> To reduce # socket connections, it would be useful for the new producer to 
> close socket connections that are idle. We can introduce a new producer 
> config for the idle time.



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

Reply via email to