From 5e98fe385036badc03376c882b9c00c94c7cf053 Mon Sep 17 00:00:00 2001 From: Adam Bien Date: Sun, 20 Dec 2020 15:57:45 +0100 Subject: [PATCH] run script added and delay configured --- kafka/kafka-oracle-connect/Dockerfile | 4 +++- kafka/kafka-oracle-connect/connector.properties | 2 +- kafka/kafka-oracle-connect/run.sh | 5 +++++ kafka/kafka-oracle-connect/worker.properties | 4 +++- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 kafka/kafka-oracle-connect/run.sh diff --git a/kafka/kafka-oracle-connect/Dockerfile b/kafka/kafka-oracle-connect/Dockerfile index 68c8fd1..a4d81b7 100644 --- a/kafka/kafka-oracle-connect/Dockerfile +++ b/kafka/kafka-oracle-connect/Dockerfile @@ -24,6 +24,8 @@ RUN cp /opt/debezium-connector-oracle/*.jar ${KAFKA_HOME}/libs/ \ RUN yum -y install libaio COPY connector.properties ${KAFKA_HOME}/config/ COPY worker.properties ${KAFKA_HOME}/config/ +COPY run.sh . +RUN chmod a+x run.sh USER serveradmin -ENTRYPOINT ${KAFKA_HOME}/bin/connect-standalone.sh ${KAFKA_HOME}/config/worker.properties ${KAFKA_HOME}/config/connector.properties +ENTRYPOINT run.sh EXPOSE 8083 diff --git a/kafka/kafka-oracle-connect/connector.properties b/kafka/kafka-oracle-connect/connector.properties index 9a1401d..cf7d542 100644 --- a/kafka/kafka-oracle-connect/connector.properties +++ b/kafka/kafka-oracle-connect/connector.properties @@ -9,5 +9,5 @@ database.password=xs database.dbname=ORCLCDB database.pdb.name=ORCLPDB1 database.out.server.name=dbzxout -database.history.kafka.bootstrap.servers=kafka:9092 +database.history.kafka.bootstrap.servers=kafka-server:9092 database.history.kafka.topic=schema_changes \ No newline at end of file diff --git a/kafka/kafka-oracle-connect/run.sh b/kafka/kafka-oracle-connect/run.sh new file mode 100644 index 0000000..c708bc5 --- /dev/null +++ b/kafka/kafka-oracle-connect/run.sh @@ -0,0 +1,5 @@ +#!/bin/sh +sleep ${START_DELAY_IN_SECONDS:-0} +echo "Waiting: ${START_DELAY_IN_SECONDS} seconds before start" +echo "KAFKA_HOME: ${KAFKA_HOME}" +${KAFKA_HOME}/bin/connect-standalone.sh ${KAFKA_HOME}/config/worker.properties ${KAFKA_HOME}/config/connector.properties \ No newline at end of file diff --git a/kafka/kafka-oracle-connect/worker.properties b/kafka/kafka-oracle-connect/worker.properties index 99b02bb..0b08d29 100644 --- a/kafka/kafka-oracle-connect/worker.properties +++ b/kafka/kafka-oracle-connect/worker.properties @@ -12,7 +12,7 @@ value.converter.schemas.enable=true offset.storage.file.filename=/opt/offset-storage.file # Flush much faster than normal, which is useful for testing/debugging -offset.flush.interval.ms=1000 +offset.flush.interval.ms=5000 # Set to a list of filesystem paths separated by commas (,) to enable class loading isolation for plugins # (connectors, converters, transformations). The list should consist of top level directories that include @@ -24,3 +24,5 @@ offset.flush.interval.ms=1000 # Examples: # plugin.path=/usr/local/share/java,/usr/local/share/kafka/plugins,/opt/connectors, plugin.path=/opt/debezium-connector-oracle +errors.tolerance=10 +errors.retry.delay.max.ms=30000