akitoshka commented on PR #14101: URL: https://github.com/apache/kafka/pull/14101#issuecomment-1653207380
@vamossagar12 and @yashmayya thank you very much for your detailed comments @vamossagar12 you are absolutely right about the flow. > Now the source tasks will , in the start of execute loop figure out that they have been asked to [stop](https://github.com/apache/kafka/blob/trunk/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractWorkerSourceTask.java#L340C26-L340C26) and it exits from the loop. One comment here: the source task will figure out that they have been asked to stop, only after [polling](https://github.com/apache/kafka/blob/d2fc9076231261db947168776505f0c21418a25f/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractWorkerSourceTask.java#L357) is stopped. In general, polling can be a long process so we suggested to call task.stop explicitly and earlier to interrupt task polling. @yashmayya unfortunately, the mentioned mechanism doesn't break task forcely and doesn't close task resources after passing `task.shutdown.graceful.timeout.ms`. -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org