C0urante commented on a change in pull request #10016:
URL: https://github.com/apache/kafka/pull/10016#discussion_r583777564



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java
##########
@@ -259,6 +267,16 @@ public void execute() {
         }
     }
 
+    private void closeProducer(Duration duration) {
+        if (producer != null) {
+            try {
+                producer.close(duration);
+            } catch (Throwable t) {

Review comment:
       Right now there aren't any code paths that lead to the worker's executor 
being shut down. One might be added in the future, but it seems a little 
premature to try to catch it right now and may mislead readers of the code 
base. Plus, if an `InterruptException` does get generated somehow, it might be 
worth knowing about as it may indicate unhealthy (or at least unexpected) 
behavior from the worker, the task, an interceptor, etc.




----------------------------------------------------------------
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


Reply via email to