use of com.github.shyiko.mysql.binlog.event.deserialization.NullEventDataDeserializer in project eventuate-local by eventuate-local.
the class MySqlBinaryLogClient method getEventDeserializer.
private EventDeserializer getEventDeserializer() {
EventDeserializer eventDeserializer = new EventDeserializer();
// do not deserialize binlog events except the EXT_WRITE_ROWS and TABLE_MAP
Arrays.stream(EventType.values()).forEach(eventType -> {
if (eventType != EventType.EXT_WRITE_ROWS && eventType != EventType.TABLE_MAP && eventType != EventType.ROTATE) {
eventDeserializer.setEventDataDeserializer(eventType, new NullEventDataDeserializer());
}
});
eventDeserializer.setEventDataDeserializer(EventType.EXT_WRITE_ROWS, new WriteRowsEventDataDeserializer(tableMapEventByTableId).setMayContainExtraInformation(true));
return eventDeserializer;
}
Aggregations