mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
@@ -130,8 +130,10 @@ public class PhTypeUtil {
|
||||
} else if (b[0] == 0) {
|
||||
v = false;
|
||||
}
|
||||
} else if (phType == PhType.TIME || phType == PhType.DATE) {
|
||||
v = new Date(decodeLong(b, 0));
|
||||
} else if (phType == PhType.DATE) {
|
||||
v = new java.sql.Date(decodeLong(b, 0));
|
||||
} else if (phType == PhType.TIME) {
|
||||
v = new java.sql.Time(decodeLong(b, 0));
|
||||
} else if (phType == PhType.TIMESTAMP) {
|
||||
long millisDeserialized = decodeLong(b, 0);
|
||||
Timestamp ts = new Timestamp(millisDeserialized);
|
||||
|
||||
@@ -56,6 +56,7 @@ public class KafkaCanalConnector implements CanalMQConnector {
|
||||
properties.put("auto.offset.reset", "latest"); // 如果没有offset则从最后的offset开始读
|
||||
properties.put("request.timeout.ms", "40000"); // 必须大于session.timeout.ms的设置
|
||||
properties.put("session.timeout.ms", "30000"); // 默认为30秒
|
||||
properties.put("isolation.level", "read_committed");
|
||||
if (batchSize == null) {
|
||||
batchSize = 100;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user