You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2022/08/23 11:29:01 UTC

[camel-quarkus] 01/02: Pass encrypt property to Debezium MS SQL Server JDBC URL

This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 16a5dcb685406e7fbd777416b7a4ea4728809cea
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Aug 23 07:57:29 2022 +0100

    Pass encrypt property to Debezium MS SQL Server JDBC URL
    
    Fixes #4027
---
 .../component/debezium/common/it/DebeziumSqlserverResource.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/integration-tests/debezium/src/main/java/org/apache/camel/quarkus/component/debezium/common/it/DebeziumSqlserverResource.java b/integration-tests/debezium/src/main/java/org/apache/camel/quarkus/component/debezium/common/it/DebeziumSqlserverResource.java
index 1809e24094..e96d93bfd9 100644
--- a/integration-tests/debezium/src/main/java/org/apache/camel/quarkus/component/debezium/common/it/DebeziumSqlserverResource.java
+++ b/integration-tests/debezium/src/main/java/org/apache/camel/quarkus/component/debezium/common/it/DebeziumSqlserverResource.java
@@ -24,6 +24,7 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 
 import org.eclipse.microprofile.config.Config;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
 
 @Path("/debezium-sqlserver")
 @ApplicationScoped
@@ -34,6 +35,9 @@ public class DebeziumSqlserverResource extends AbstractDebeziumResource {
 
     public static final String DB_NAME = "testDB";
 
+    @ConfigProperty(name = "sqlserver.encrypt", defaultValue = "false")
+    Boolean encryptConnection;
+
     @Inject
     Config config;
 
@@ -65,6 +69,7 @@ public class DebeziumSqlserverResource extends AbstractDebeziumResource {
             String offsetStorageFileName) {
         return super.getEndpoinUrl(hostname, port, username, password, databaseServerName, offsetStorageFileName)
                 + "&databaseDbname=" + DB_NAME
-                + "&databaseHistoryFileFilename=" + config.getValue(PROPERTY_DB_HISTORY_FILE, String.class);
+                + "&databaseHistoryFileFilename=" + config.getValue(PROPERTY_DB_HISTORY_FILE, String.class)
+                + "&additionalProperties.database.encrypt=" + encryptConnection;
     }
 }