diff --git a/README.md b/README.md index 691f825..9d2361e 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -Schema Registry Transfer SMT +Schema Registry Transfer SMT ============================ +[ ![Download](https://api.bintray.com/packages/cricket007/maven-releases/schema-registry-transfer-smt/images/download.svg) ](https://bintray.com/cricket007/maven-releases/schema-registry-transfer-smt/_latestVersion)  [![CircleCI](https://circleci.com/gh/cricket007/schema-registry-transfer-smt.svg?style=svg)](https://circleci.com/gh/cricket007/schema-registry-transfer-smt) +A [Kafka Connect Single Message Transformation (SMT)][smt] that reads the serialized [wire format header][wire-format] of Confluent's `KafkaAvroSerializer`, performs a lookup against a source [Confluent Schema Registry][schema-registry] for the ID in the message, and registers that schema into a destination Registry for that topic/subject under a new ID. -A [Kafka Connect Single Message Transformation (SMT)][smt] that reads the serialized [wire format header][wire-format] of Confluent's `KafkaAvroSerializer`, performs a lookup against a source [Confluent Schema Registry][schema-registry] for the ID in the message, and registers that schema into a destination Registry for that topic/subject under a new ID. - -To be used where it is not feasible to make the destination Schema Registry as a follower to the source Registry, or when migrating topics to a new cluster. +To be used where it is not feasible to make the destination Schema Registry as a follower to the source Registry, or when migrating topics to a new cluster. > _Requires that the Kafka Connect tasks can reach both Schema Registries._ -This transform doesn't mirror the contents of the `_schemas` topic, so therefore each registry can be completely isolated from one another. As a side-effect of this, the subject configurations that might be applied to the `/config` endpoint in the source registry are not copied to the destination. In other words, you might get schema registration errors if using differing compatibility levels on the registries. Just a heads-up. +This transform doesn't mirror the contents of the `_schemas` topic, so therefore each registry can be completely isolated from one another. As a side-effect of this, the subject configurations that might be applied to the `/config` endpoint in the source registry are not copied to the destination. In other words, you might get schema registration errors if using differing compatibility levels on the registries. Just a heads-up. Example Kafka Connectors where this could be applied. diff --git a/pom.xml b/pom.xml index 33e14e3..25ffbf5 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ Jordan Moore https://github.com/cricket007 - Committer + Owner @@ -39,6 +39,13 @@ github https://github.com/cricket007/schema-registry-transfer-smt/issues + + + bintray + bintray-releases + https://api.bintray.com/maven/${env.BINTRAY_REPO_OWNER}/${env.BINTRAY_REPO}/${project.artifactId}/;publish=1 + + @@ -60,6 +67,7 @@ 1.8 1.8 + 1.7.25 2.1.0 5.1.0 -cp1 @@ -77,7 +85,7 @@ org.slf4j slf4j-api - 1.7.25 + ${slf4j.version} provided @@ -212,7 +220,7 @@ org.slf4j log4j-over-slf4j - 1.7.25 + ${slf4j.version} test @@ -242,6 +250,10 @@ + + maven-release-plugin + 2.5.3 + org.apache.maven.plugins maven-shade-plugin @@ -339,4 +351,4 @@ - \ No newline at end of file + diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..a5ca803 --- /dev/null +++ b/settings.xml @@ -0,0 +1,11 @@ + + + + + bintray + ${env.BINTRAY_USER} + ${env.BINTRAY_API_KEY} + + + diff --git a/src/test/java/cricket/jmoore/kafka/connect/transforms/TransformTest.java b/src/test/java/cricket/jmoore/kafka/connect/transforms/TransformTest.java index aedea18..97b3a9a 100644 --- a/src/test/java/cricket/jmoore/kafka/connect/transforms/TransformTest.java +++ b/src/test/java/cricket/jmoore/kafka/connect/transforms/TransformTest.java @@ -2,6 +2,9 @@ package cricket.jmoore.kafka.connect.transforms; import static cricket.jmoore.kafka.connect.transforms.SchemaRegistryTransfer.ConfigName; +import static org.apache.avro.Schema.Type.BOOLEAN; +import static org.apache.avro.Schema.Type.INT; +import static org.apache.avro.Schema.Type.STRING; import static org.junit.jupiter.api.Assertions.*; import java.io.ByteArrayOutputStream; @@ -38,10 +41,6 @@ import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient; import io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException; import io.confluent.kafka.serializers.NonRecordContainer; -import static org.apache.avro.Schema.Type.INT; -import static org.apache.avro.Schema.Type.BOOLEAN; -import static org.apache.avro.Schema.Type.STRING; - @SuppressWarnings("unchecked") public class TransformTest {