mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed bug
This commit is contained in:
@@ -126,7 +126,7 @@ public class CanalKafkaProducer implements CanalMQProducer {
|
||||
producerTmp.commitTransaction();
|
||||
}
|
||||
callback.commit();
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
if (kafkaProperties.getTransaction()) {
|
||||
producerTmp.abortTransaction();
|
||||
|
||||
@@ -75,7 +75,7 @@ public class CanalRocketMQProducer implements CanalMQProducer {
|
||||
send(destination, destination.getTopic(), data);
|
||||
}
|
||||
callback.commit();
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
callback.rollback();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user