fixed bug

This commit is contained in:
agapple
2019-03-21 20:26:00 +08:00
parent 024ffc2aa2
commit 531b535228
5 changed files with 22 additions and 4 deletions

View File

@@ -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();

View File

@@ -75,7 +75,7 @@ public class CanalRocketMQProducer implements CanalMQProducer {
send(destination, destination.getTopic(), data);
}
callback.commit();
} catch (Exception e) {
} catch (Throwable e) {
callback.rollback();
}
}