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

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

Nicu,

I was doing some manual testing of this feature. What I observed is that 
sometimes, the idle connections are not closed. The following was what I did.

1. Configure a small connections.max.idle.ms = 10000.
2. start ZK and Kafka broker
3. start a console consumer
bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic topic1 
--from-beginning
4. start a console producer and type in sth every 15 secs or so. 
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic topic1 
--request-required-acks 1

What I observed was that initially, the producer connections kept getting 
killed by the broker correctly after being idle for 10 secs. The next producer 
send would hit an IOException and trigger a resend. However, after typing in 10 
or so messages, at some point, no idle connections were killed by the broker 
any more and the producer send always succeeded.

> 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: 1282_brush.patch, 1282_brushed_up.patch, 
> KAFKA-1282_Disconnect_idle_socket_connection_in_Selector.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