[ https://issues.apache.org/jira/browse/KAFKA-1316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14011551#comment-14011551 ]
Guozhang Wang commented on KAFKA-1316: -------------------------------------- Here are some more thoughts: If we are going to treat the coordinator as a separate server with its own socket connection, we still need to consider the case where we need to "expire" an inflight request when timing out happens since we store inflight requests in an ordering deque and always match the received response with the "oldest" inflight requests. However, when a heartbeat request gets timed out, we have effectively expired the corresponding client request and need to remove that from the deque. > Refactor Sender > --------------- > > Key: KAFKA-1316 > URL: https://issues.apache.org/jira/browse/KAFKA-1316 > Project: Kafka > Issue Type: Sub-task > Components: producer > Reporter: Jay Kreps > Assignee: Jay Kreps > Attachments: KAFKA-1316.patch > > > Currently most of the logic of the producer I/O thread is in Sender.java. > However we will need to do a fair number of similar things in the new > consumer. Specifically: > - Track in-flight requests > - Fetch metadata > - Manage connection lifecycle > It may be possible to refactor some of this into a helper class that can be > shared with the consumer. This will require some detailed thought. -- This message was sent by Atlassian JIRA (v6.2#6252)