You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Oleg Kuznetsov (JIRA)" <ji...@apache.org> on 2017/09/10 17:34:00 UTC

[jira] [Created] (KAFKA-5866) Let source/sink task to finish their job before exit

Oleg Kuznetsov created KAFKA-5866:
-------------------------------------

             Summary: Let source/sink task to finish their job before exit
                 Key: KAFKA-5866
                 URL: https://issues.apache.org/jira/browse/KAFKA-5866
             Project: Kafka
          Issue Type: Bug
          Components: KafkaConnect
    Affects Versions: 0.10.2.0
            Reporter: Oleg Kuznetsov


My case is about reading files. When task stops to rebalance or for other reason, I want let it to read file till the end at least.

I found that flag 
{code:java}
WorkerTask#stopping
{code}
 is set to true and only then 
{code:java}
SourceTask.stop()
{code}
 is called. This stopping flag prevents WorkerSourceTask from further ingestion (exit from 
{code:java}
while ( !isStopped()))
{code}.

Is it possible to let task to decide to work some more time and possibly produce more records from the moment of stop() was called on rebalance?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)