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

ASF GitHub Bot commented on KAFKA-9615:
---------------------------------------

vvcephei commented on pull request #8213: KAFKA-9615: Clean up task/producer 
create and close
URL: https://github.com/apache/kafka/pull/8213
 
 
   Consolidates task/producer management.
   
   Now, exactly one component manages the creation and destruction of Producers,
   whether they are per-thread or per-task.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Refactor TaskManager to extract task creation / cleanup out of StreamThread
> ---------------------------------------------------------------------------
>
>                 Key: KAFKA-9615
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9615
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Guozhang Wang
>            Assignee: John Roesler
>            Priority: Major
>
> We have a TODO marker for moving the task-creators into the task-manager as a 
> follow-up of the tech cleanup, and here are some rationales:
> 1. right now the reason we keep the task-creators in stream-thread is to be 
> able to mock task creation in task-manager tests, but that should be better 
> achieved with easy mocks on interfaces than this.
> 2. the thread only need the thread-producer for a) metrics exposure and b) 
> thread-metadata's producer-client ids. Both of them can be exposed from the 
> task-manager instead of thread-producer.
> So the idea is that we let the task-manager to abstract / mock the 
> task-creation and manage the producer(s) internally as well, and expose to 
> stream-thread only the metrics / client-ids information upon request. With 
> that it makes more sense to let the creator be the closer of the producer(s) 
> --- i.e. the task-manager, not the stream-producer.
> And we can fix a couple "FIXMEs" as well along with this effort.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to