Oleg Muravskiy created KAFKA-9128:
-------------------------------------

             Summary: ConsumerCoordinator ignores exceptions from 
ConsumerRebalanceListener
                 Key: KAFKA-9128
                 URL: https://issues.apache.org/jira/browse/KAFKA-9128
             Project: Kafka
          Issue Type: Bug
          Components: consumer
    Affects Versions: 2.3.0
            Reporter: Oleg Muravskiy


I'm using a custom ConsumerRebalanceListener with a plain old Kafka consumer to 
manage offsets in an external storage as described in 
ConsumerRebalanceListener's javadoc.

When that storage is not available, I'm throwing an exception from my listener. 
However, the exception is simply logged and ignored by the ConsumerCoordinator, 
as could be seen in these two code snippets from it:


{code:java}
       try {
           listener.onPartitionsRevoked(revoked);
       } catch (WakeupException | InterruptException e) {
           throw e;
       } catch (Exception e) {
           log.error("User provided listener {} failed on partition 
revocation", listener.getClass().getName(), e);
       }{code}

and 


{code:java}
       try {
           listener.onPartitionsAssigned(assignedPartitions);
       } catch (WakeupException | InterruptException e) {
           throw e;
       } catch (Exception e) {
           log.error("User provided listener {} failed on partition 
assignment", listener.getClass().getName(), e);
       }{code}
The consumption continues as if nothing has happened.



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

Reply via email to