Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debezium SQL Server Connector native support #1193 #1278

Merged
merged 1 commit into from
Jun 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 20 additions & 1 deletion docs/modules/ROOT/pages/extensions/debezium-sqlserver.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
= Debezium SQL Server Connector

[.badges]
[.badge-key]##Since Camel Quarkus##[.badge-version]##1.0.0-M6## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
[.badge-key]##Since Camel Quarkus##[.badge-version]##1.0.0-M6## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-supported]##supported##

Capture changes from an SQL Server database.

Expand All @@ -26,3 +26,22 @@ Please refer to the above link for usage and configuration details.
----

Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.

== Usage

SQL server may require encryption. In that case `quarkus.ssl.native=false` parameter has to be added during execution.
See https://quarkus.io/guides/native-and-ssl for more details.



== Camel Quarkus limitations

While you can use any of the available Kafka offset stores in JVM mode, only the following offset stores are supported
in native mode:

* `org.apache.kafka.connect.storage.FileOffsetBackingStore`
* `org.apache.kafka.connect.storage.MemoryOffsetBackingStore`

Please file an https://github.com/apache/camel-quarkus/issues/new[issue] if you are missing some specific offset store
in native mode.

Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Number of Camel components: 148 in 113 JAR artifacts (0 deprecated)

| xref:extensions/debezium-postgres.adoc[Debezium PostgresSQL Connector] | camel-quarkus-debezium-postgres | Native + Stable | 1.0.0-M6 | Capture changes from a PostgresSQL database.

| xref:extensions/debezium-sqlserver.adoc[Debezium SQL Server Connector] | camel-quarkus-debezium-sqlserver | JVM + Preview | 1.0.0-M6 | Capture changes from an SQL Server database.
| xref:extensions/debezium-sqlserver.adoc[Debezium SQL Server Connector] | camel-quarkus-debezium-sqlserver | Native + Stable | 1.0.0-M6 | Capture changes from an SQL Server database.

| xref:extensions/direct.adoc[Direct] | camel-quarkus-direct | Native + Stable | 0.2.0 | Call another endpoint from the same Camel Context synchronously.

Expand Down
81 changes: 0 additions & 81 deletions extensions-jvm/debezium-sqlserver/integration-test/pom.xml

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion extensions-jvm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
<module>cassandraql</module>
<module>couchbase</module>
<module>debezium-mongodb</module>
<module>debezium-sqlserver</module>
<module>google-bigquery</module>
<module>google-pubsub</module>
<module>groovy</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.quarkus</groupId>
Expand Down Expand Up @@ -46,6 +48,10 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-debezium-sqlserver</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-support-debezium-deployment</artifactId>
Expand All @@ -54,10 +60,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-mssql-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-debezium-sqlserver</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@
*/
package org.apache.camel.quarkus.component.debezium.sqlserver.deployment;

import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.pkg.steps.NativeBuild;
import org.apache.camel.quarkus.core.JvmOnlyRecorder;
import org.jboss.logging.Logger;
import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;

class DebeziumSqlserverProcessor {
private static final Logger LOG = Logger.getLogger(DebeziumSqlserverProcessor.class);

private static final String FEATURE = "camel-debezium-sqlserver";

Expand All @@ -34,14 +31,15 @@ FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
}

/**
* Remove this once this extension starts supporting the native mode.
*/
@BuildStep(onlyIf = NativeBuild.class)
@Record(value = ExecutionTime.RUNTIME_INIT)
void warnJvmInNative(JvmOnlyRecorder recorder) {
JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
recorder.warnJvmInNative(FEATURE); // warn at runtime
@BuildStep
ReflectiveClassBuildItem reflectiveClasses() {
return new ReflectiveClassBuildItem(false, false,
new String[] { "io.debezium.connector.sqlserver.SqlServerConnector",
"io.debezium.connector.sqlserver.SqlServerConnectorTask" });
}

@BuildStep
void addDependencies(BuildProducer<IndexDependencyBuildItem> indexDependency) {
indexDependency.produce(new IndexDependencyBuildItem("io.debezium", "debezium-connector-sqlserver"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-build-parent-it</artifactId>
<artifactId>camel-quarkus-build-parent</artifactId>
<version>1.1.0-SNAPSHOT</version>
<relativePath>../../poms/build-parent-it/pom.xml</relativePath>
<relativePath>../../poms/build-parent/pom.xml</relativePath>
</parent>

<artifactId>camel-quarkus-debezium-sqlserver-parent</artifactId>
Expand All @@ -33,6 +35,5 @@
<modules>
<module>deployment</module>
<module>runtime</module>
<module>integration-test</module>
</modules>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.quarkus</groupId>
Expand All @@ -28,6 +30,7 @@

<artifactId>camel-quarkus-debezium-sqlserver</artifactId>
<name>Camel Quarkus :: Debezium SQL Server Connector :: Runtime</name>
<description>Capture changes from an SQL Server database.</description>

<properties>
<firstVersion>1.0.0-M6</firstVersion>
Expand All @@ -50,6 +53,16 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-debezium-sqlserver</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-support-debezium</artifactId>
Expand All @@ -58,10 +71,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-mssql</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-debezium-sqlserver</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
While you can use any of the available Kafka offset stores in JVM mode, only the following offset stores are supported
in native mode:

* `org.apache.kafka.connect.storage.FileOffsetBackingStore`
* `org.apache.kafka.connect.storage.MemoryOffsetBackingStore`
Please file an https://github.com/apache/camel-quarkus/issues/new[issue] if you are missing some specific offset store
in native mode.
3 changes: 3 additions & 0 deletions extensions/debezium-sqlserver/runtime/src/main/doc/usage.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SQL server may require encryption. In that case `quarkus.ssl.native=false` parameter has to be added during execution.
See https://quarkus.io/guides/native-and-ssl for more details.

Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
name: "Camel Debezium SQL Server Connector"
description: "Capture changes from an SQL Server database"
metadata:
unlisted: true
guide: "https://camel.apache.org/camel-quarkus/latest/extensions/debezium-sqlserver.html"
categories:
- "integration"
status: "preview"
1 change: 1 addition & 0 deletions extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
<module>dataformat</module>
<module>debezium-mysql</module>
<module>debezium-postgres</module>
<module>debezium-sqlserver</module>
<module>direct</module>
<module>dozer</module>
<module>elasticsearch-rest</module>
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/debezium/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
libs/mysql-connector-java-*.jar
libs/mysql-connector-java-*.jar
src/test/resources/*-license-*