Skip to content

Commit b76f3a6

Browse files
author
Jordan Moore
committed
Release to Bintray
1 parent cf5d375 commit b76f3a6

File tree

4 files changed

+35
-13
lines changed

4 files changed

+35
-13
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
Schema Registry Transfer SMT
1+
Schema Registry Transfer SMT
22
============================
3+
[ ![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) 
34
[![CircleCI](https://circleci.com/gh/cricket007/schema-registry-transfer-smt.svg?style=svg)](https://circleci.com/gh/cricket007/schema-registry-transfer-smt)
45

6+
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.
57

6-
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.
7-
8-
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.
8+
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.
99

1010
> _Requires that the Kafka Connect tasks can reach both Schema Registries._
1111
12-
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.
12+
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.
1313

1414
Example Kafka Connectors where this could be applied.
1515

pom.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<name>Jordan Moore</name>
2727
<url>https://github.com/cricket007</url>
2828
<roles>
29-
<role>Committer</role>
29+
<role>Owner</role>
3030
</roles>
3131
</developer>
3232
</developers>
@@ -39,6 +39,13 @@
3939
<system>github</system>
4040
<url>https://github.com/cricket007/schema-registry-transfer-smt/issues</url>
4141
</issueManagement>
42+
<distributionManagement>
43+
<repository>
44+
<id>bintray</id>
45+
<name>bintray-releases</name>
46+
<url>https://api.bintray.com/maven/${env.BINTRAY_REPO_OWNER}/${env.BINTRAY_REPO}/${project.artifactId}/;publish=1</url>
47+
</repository>
48+
</distributionManagement>
4249

4350
<repositories>
4451
<repository>
@@ -60,6 +67,7 @@
6067
<maven.compiler.source>1.8</maven.compiler.source>
6168
<maven.compiler.target>1.8</maven.compiler.target>
6269

70+
<slf4j.version>1.7.25</slf4j.version>
6371
<kafka.version>2.1.0</kafka.version>
6472
<confluent.version>5.1.0</confluent.version>
6573
<confluent.patch.version>-cp1</confluent.patch.version>
@@ -77,7 +85,7 @@
7785
<dependency>
7886
<groupId>org.slf4j</groupId>
7987
<artifactId>slf4j-api</artifactId>
80-
<version>1.7.25</version>
88+
<version>${slf4j.version}</version>
8189
<scope>provided</scope>
8290
</dependency>
8391

@@ -212,7 +220,7 @@
212220
<dependency>
213221
<groupId>org.slf4j</groupId>
214222
<artifactId>log4j-over-slf4j</artifactId>
215-
<version>1.7.25</version>
223+
<version>${slf4j.version}</version>
216224
<scope>test</scope>
217225
</dependency>
218226

@@ -242,6 +250,10 @@
242250
</plugins>
243251
</pluginManagement>
244252
<plugins>
253+
<plugin>
254+
<artifactId>maven-release-plugin</artifactId>
255+
<version>2.5.3</version>
256+
</plugin>
245257
<plugin>
246258
<groupId>org.apache.maven.plugins</groupId>
247259
<artifactId>maven-shade-plugin</artifactId>
@@ -339,4 +351,4 @@
339351
</plugins>
340352
</build>
341353

342-
</project>
354+
</project>

settings.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<settings xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'
3+
xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
4+
<servers>
5+
<server>
6+
<id>bintray</id>
7+
<username>${env.BINTRAY_USER}</username>
8+
<password>${env.BINTRAY_API_KEY}</password>
9+
</server>
10+
</servers>
11+
</settings>

src/test/java/cricket/jmoore/kafka/connect/transforms/TransformTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
package cricket.jmoore.kafka.connect.transforms;
33

44
import static cricket.jmoore.kafka.connect.transforms.SchemaRegistryTransfer.ConfigName;
5+
import static org.apache.avro.Schema.Type.BOOLEAN;
6+
import static org.apache.avro.Schema.Type.INT;
7+
import static org.apache.avro.Schema.Type.STRING;
58
import static org.junit.jupiter.api.Assertions.*;
69

710
import java.io.ByteArrayOutputStream;
@@ -38,10 +41,6 @@
3841
import io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException;
3942
import io.confluent.kafka.serializers.NonRecordContainer;
4043

41-
import static org.apache.avro.Schema.Type.INT;
42-
import static org.apache.avro.Schema.Type.BOOLEAN;
43-
import static org.apache.avro.Schema.Type.STRING;
44-
4544
@SuppressWarnings("unchecked")
4645
public class TransformTest {
4746

0 commit comments

Comments
 (0)