private final String id;
private final String topic;
private final Consumer<K, V> consumer;
- private final PollIntervalAwareConsumerRebalanceListener rebalanceListener;
+ private final ConsumerRebalanceListener rebalanceListener;
private final RecordHandler<K, V> recordHandler;
private final Lock lock = new ReentrantLock();
try
{
log.info("{} - Subscribing to topic {}", id, topic);
- rebalanceListener.enableCommits();
consumer.subscribe(Arrays.asList(topic), rebalanceListener);
while (true)
consumed++;
}
-
- rebalanceListener.beforeNextPoll();
}
}
catch(WakeupException e)
{
- log.info("{} - RIIING! Request to stop consumption - commiting current offsets!", id);
+ log.info("{} - RIIING! Request to stop consumption.", id);
shutdown();
}
catch(RecordDeserializationException e)
}
catch(Exception e)
{
- log.error("{} - Unexpected error: {}, disabling commits", id, e.toString(), e);
- rebalanceListener.disableCommits();
+ log.error("{} - Unexpected error: {}", id, e.toString(), e);
shutdown(e);
}
finally