You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Guozhang Wang (JIRA)" <ji...@apache.org> on 2016/04/12 01:57:25 UTC

[jira] [Updated] (KAFKA-3523) Capture org.apache.kafka.clients.consumer.CommitFailedException in UncaughtExceptionHandler

     [ https://issues.apache.org/jira/browse/KAFKA-3523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guozhang Wang updated KAFKA-3523:
---------------------------------
    Description: 
When the sync commit failed due to an ongoing rebalance, it is thrown all the way up to the main thread and cause the whole Kafka Streams application to stop, even if users set UncaughtExceptionHandler. We need to be able to catch this exception in that handler as well.

Example stack trace (with UncaughtExceptionHandler set, but not been able to capture this exception):

{code}
[2016-04-06 17:49:33,891] WARN Failed to commit StreamTask #0_0 in thread [StreamThread-1]:  (org.apache.kafka.streams.processor.internals.StreamThread:485)
org.apache.kafka.clients.consumer.CommitFailedException: Commit cannot be completed since the group has already rebalanced and assigned the partitions to another member. This means that the time between subsequent calls to poll() was longer than the configured session.timeout.ms, which typically implies that the poll loop is spending too much time message processing. You can address this either by increasing the session timeout or by reducing the maximum size of batches returned in poll() with max.poll.records.
    at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator$OffsetCommitResponseHandler.handle(ConsumerCoordinator.java:567)
    at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator$OffsetCommitResponseHandler.handle(ConsumerCoordinator.java:508)
    at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$CoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:659)
{code}

  was:When the sync commit failed due to an ongoing rebalance, it is thrown all the way up to the main thread and cause the whole Kafka Streams application to stop, even if users set UncaughtExceptionHandler. We need to be able to catch this exception in that handler as well.


> Capture org.apache.kafka.clients.consumer.CommitFailedException in UncaughtExceptionHandler
> -------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-3523
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3523
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>            Reporter: Guozhang Wang
>              Labels: newbie, user-experience
>             Fix For: 0.10.0.0
>
>
> When the sync commit failed due to an ongoing rebalance, it is thrown all the way up to the main thread and cause the whole Kafka Streams application to stop, even if users set UncaughtExceptionHandler. We need to be able to catch this exception in that handler as well.
> Example stack trace (with UncaughtExceptionHandler set, but not been able to capture this exception):
> {code}
> [2016-04-06 17:49:33,891] WARN Failed to commit StreamTask #0_0 in thread [StreamThread-1]:  (org.apache.kafka.streams.processor.internals.StreamThread:485)
> org.apache.kafka.clients.consumer.CommitFailedException: Commit cannot be completed since the group has already rebalanced and assigned the partitions to another member. This means that the time between subsequent calls to poll() was longer than the configured session.timeout.ms, which typically implies that the poll loop is spending too much time message processing. You can address this either by increasing the session timeout or by reducing the maximum size of batches returned in poll() with max.poll.records.
>     at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator$OffsetCommitResponseHandler.handle(ConsumerCoordinator.java:567)
>     at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator$OffsetCommitResponseHandler.handle(ConsumerCoordinator.java:508)
>     at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$CoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:659)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)