You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Manjunath Shettar (Jira)" <ji...@apache.org> on 2021/10/06 18:53:00 UTC

[jira] [Commented] (KAFKA-7996) KafkaStreams does not pass timeout when closing Producer

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

Manjunath Shettar commented on KAFKA-7996:
------------------------------------------

Hello,

Our Kafka streams application sometimes gets into a hung state preventing the main process from exiting. I stumbled upon this ticket while trying to root cause the issue. It looks like what we are seeing is similar to whats described above and also in [https://github.com/apache/kafka/pull/7814|https://github.com/apache/kafka/pull/7814.]

We are currently running on kafka 2.4.1. It appears that streams.close() api implementation has changed quite a bit in the latest kafka releases, especially 2.8 onwards. However, a closer look at the {{close()}} api implementation of [StreamThread.java|https://github.com/apache/kafka/blob/2.8.0/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java#L1064] reveals that close api of producer, consumer, etc can still block the stream thread and hence block the streams app from closing gracefully.
 # Could someone confirm if this issue still exists or if it has been fixed ?
 ## If yes, could you please let us know the version containing the corresponding fix.
 ## If not, is there a plan to check in on this issue in the near future ?

 

thanks,
Manjunath

> KafkaStreams does not pass timeout when closing Producer
> --------------------------------------------------------
>
>                 Key: KAFKA-7996
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7996
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.1.0
>            Reporter: Patrik Kleindl
>            Priority: Major
>              Labels: needs-kip
>
> KIP WIP: [https://cwiki.apache.org/confluence/display/KAFKA/KIP-459%3A+Improve+KafkaStreams%23close]
> [https://confluentcommunity.slack.com/messages/C48AHTCUQ/convo/C48AHTCUQ-1550831721.026100/]
> We are running 2.1 and have a case where the shutdown of a streams application takes several minutes
>  I noticed that although we call streams.close with a timeout of 30 seconds the log says
>  [Producer clientId=…-8be49feb-8a2e-4088-bdd7-3c197f6107bb-StreamThread-1-producer] Closing the Kafka producer with timeoutMillis = 9223372036854775807 ms.
> Matthias J Sax [vor 3 Tagen]
>  I just checked the code, and yes, we don't provide a timeout for the producer on close()...



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