Skip to content

Commit

Permalink
0003661: Kafka support in conjunction with a Confluent registry
Browse files Browse the repository at this point in the history
Description
  • Loading branch information
jumpmind-josh committed Aug 3, 2018
1 parent 15b88a4 commit e311e24
Show file tree
Hide file tree
Showing 6 changed files with 401 additions and 210 deletions.
4 changes: 3 additions & 1 deletion symmetric-assemble/common.gradle
Expand Up @@ -24,6 +24,7 @@ allprojects {
mavenCentral() mavenCentral()
maven { url "http://maven.vaadin.com/vaadin-addons" } maven { url "http://maven.vaadin.com/vaadin-addons" }
maven { url 'https://plugins.gradle.org/m2' } maven { url 'https://plugins.gradle.org/m2' }
maven { url "http://packages.confluent.io/maven/" }
} }


ext { ext {
Expand Down Expand Up @@ -236,7 +237,8 @@ subprojects { subproject ->
provided "nl.cad:tps-parse:1.0.15-SNAPSHOT" provided "nl.cad:tps-parse:1.0.15-SNAPSHOT"
provided "org.apache.kafka:kafka-clients:1.1.0" provided "org.apache.kafka:kafka-clients:1.1.0"
provided "org.apache.avro:avro:1.8.2" provided "org.apache.avro:avro:1.8.2"

provided "io.confluent:kafka-avro-serializer:3.2.1"

testCompile fileTree(dir: System.getProperty("user.home") + '/.symmetricds/lib', include: '*.jar') testCompile fileTree(dir: System.getProperty("user.home") + '/.symmetricds/lib', include: '*.jar')
testCompile "junit:junit:$junitVersion" testCompile "junit:junit:$junitVersion"
testCompile "org.hamcrest:hamcrest-all:$hamcrestVersion" testCompile "org.hamcrest:hamcrest-all:$hamcrestVersion"
Expand Down
23 changes: 22 additions & 1 deletion symmetric-assemble/src/asciidoc/appendix/kafka.ad
Expand Up @@ -127,4 +127,25 @@ kafka.producer


ifdef::pro[] ifdef::pro[]
Provide a value for the producer of the message. Provide a value for the producer of the message.
endif::pro[] endif::pro[]


==== Using a Confluent AVRO Schema Registry

====
NOTE: The message format must be AVRO for this option to work.
====

.Set following property to a Confluent registry.
----
kafka.confluent.registry.url
----

.Set following property to the base java package that contains the java POJOs that implement the org.apache.avro.generic.IndexedRecord.
----
kafka.avro.java.package
----

====
NOTE: The jar file containing the AVRO generated POJO java beans must be placed in the /lib or /patches folder of SymmetricDS and then a restart is required.
====
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions symmetric-core/build.gradle
Expand Up @@ -9,6 +9,7 @@ apply from: symAssembleDir + '/common.gradle'
compile "javax.mail:mail:1.4.5" compile "javax.mail:mail:1.4.5"
compile "com.fasterxml.jackson.core:jackson-databind:2.9.3" compile "com.fasterxml.jackson.core:jackson-databind:2.9.3"
compile "com.google.code.gson:gson:2.8.2" compile "com.google.code.gson:gson:2.8.2"
compile "org.springframework:spring-core:$springVersion"


testCompile project(path: ':symmetric-util', configuration: 'testArtifacts') testCompile project(path: ':symmetric-util', configuration: 'testArtifacts')
testCompile project(path: ':symmetric-jdbc', configuration: 'testArtifacts') testCompile project(path: ':symmetric-jdbc', configuration: 'testArtifacts')
Expand Down
Expand Up @@ -449,7 +449,8 @@ private ParameterConstants() {
public final static String KAFKA_FORMAT = "kafka.format"; public final static String KAFKA_FORMAT = "kafka.format";
public final static String KAFKA_MESSAGE_BY = "kafka.message.by"; public final static String KAFKA_MESSAGE_BY = "kafka.message.by";
public final static String KAFKA_TOPIC_BY = "kafka.topic.by"; public final static String KAFKA_TOPIC_BY = "kafka.topic.by";

public final static String KAFKA_CONFLUENT_REGISTRY_URL = "kafka.confluent.registry.url";
public final static String KAFKA_AVRO_JAVA_PACKAGE = "kafka.avro.java.package";


public static Map<String, ParameterMetaData> getParameterMetaData() { public static Map<String, ParameterMetaData> getParameterMetaData() {
return parameterMetaData; return parameterMetaData;
Expand Down

0 comments on commit e311e24

Please sign in to comment.