poorbarcode commented on code in PR #20795:
URL: https://github.com/apache/pulsar/pull/20795#discussion_r1262054448
##########
pulsar-io/kafka/src/main/java/org/apache/pulsar/io/kafka/KafkaAbstractSource.java:
##########
@@ -190,14 +190,12 @@ public void start() {
});
runnerThread.setUncaughtExceptionHandler(
(t, e) -> {
- new Thread(() -> {
- LOG.error("[{}] Error while consuming records",
t.getName(), e);
- try {
- this.close();
- } catch (Exception ex) {
- LOG.error("[{}] Close kafka source error",
t.getName(), e);
- }
- }, "Kafka Source Close Task Thread").start();
+ LOG.error("[{}] Error while consuming records",
t.getName(), e);
+ try {
+ notifyError((Exception) e);
Review Comment:
Maybe throwable is not instance of `Exception`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]