Skip to content

Commit

Permalink
DBZ-7512 Adds support for string and binary formats
Browse files Browse the repository at this point in the history
  • Loading branch information
akula committed Feb 20, 2024
1 parent b9c461b commit a9742e0
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
import io.debezium.engine.format.Json;
import io.debezium.engine.format.JsonByteArray;
import io.debezium.engine.format.Protobuf;
import io.debezium.engine.format.Binary;
import io.debezium.engine.format.SimpleString;
import io.debezium.relational.history.SchemaHistory;
import io.debezium.server.events.ConnectorCompletedEvent;
import io.quarkus.runtime.Quarkus;
Expand Down Expand Up @@ -90,6 +92,8 @@ public class DebeziumServer {
private static final String FORMAT_CLOUDEVENT = CloudEvents.class.getSimpleName().toLowerCase();
private static final String FORMAT_AVRO = Avro.class.getSimpleName().toLowerCase();
private static final String FORMAT_PROTOBUF = Protobuf.class.getSimpleName().toLowerCase();
private static final String FORMAT_BINARY = Binary.class.getSimpleName().toLowerCase();
private static final String FORMAT_STRING = SimpleString.class.getSimpleName().toLowerCase();

private static final Pattern SHELL_PROPERTY_NAME_PATTERN = Pattern.compile("^[a-zA-Z0-9_]+_+[a-zA-Z0-9_]+$");

Expand Down Expand Up @@ -218,6 +222,12 @@ else if (FORMAT_AVRO.equals(formatName)) {
else if (FORMAT_PROTOBUF.equals(formatName)) {
return Protobuf.class;
}
else if (FORMAT_BINARY.equals(formatName)) {
return Binary.class;
}
else if (FORMAT_STRING.equals(formatName)) {
return SimpleString.class;
}
throw new DebeziumException("Unknown format '" + formatName + "' for option " + "'" + property + "'");
}

Expand Down

0 comments on commit a9742e0

Please sign in to comment.