diff --git a/.circleci/config.yml b/.circleci/config.yml index 45447e2..79bf54d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,10 @@ jobs: - ~/.gradle - ~/.m2 key: eventuate-tram-core-examples-basic-{{ checksum "gradle.properties" }} - - run: TERM=dumb ./build-and-test-all.sh - run: TERM=dumb ./build-and-test-all-maven.sh + - run: TERM=dumb ./build-and-test-all-mysql-binlog-kafka.sh + - run: TERM=dumb ./build-and-test-all-mssql-polling-kafka.sh + - run: TERM=dumb ./build-and-test-all-postgres-wal-activemq.sh + - run: TERM=dumb ./build-and-test-all-postgres-wal-rabbitmq.sh - store_test_results: path: "*/build/test-results" diff --git a/_set-env.sh b/_set-env.sh index f292dbf..54fa37e 100644 --- a/_set-env.sh +++ b/_set-env.sh @@ -10,7 +10,5 @@ fi echo DOCKER_HOST_IP is $DOCKER_HOST_IP -export EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS=$DOCKER_HOST_IP:9092 export EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING=$DOCKER_HOST_IP:2181 -export ACTIVEMQ_URL=tcp://${DOCKER_HOST_IP}:61616 -export RABBITMQ_URL=${DOCKER_HOST_IP} + diff --git a/build-and-test-all-maven.sh b/build-and-test-all-maven.sh index 54867f8..f319ede 100755 --- a/build-and-test-all-maven.sh +++ b/build-and-test-all-maven.sh @@ -2,18 +2,18 @@ set -e -. ./set-env.sh +. ./set-env-mysql-binlog.sh ./mvnw clean compile ./mvnw -am -pl eventuate-tram-examples-in-memory test -docker-compose down -v +docker-compose -f docker-compose-mysql-binlog.yml down -v -docker-compose up -d +docker-compose -f docker-compose-mysql-binlog.yml up -d ./wait-for-mysql.sh ./mvnw -am -pl eventuate-tram-examples-jdbc-kafka test -docker-compose down -v +docker-compose -f docker-compose-mysql-binlog.yml down -v diff --git a/build-and-test-all-postgres-polling-kafka.sh b/build-and-test-all-mssql-polling-kafka.sh similarity index 60% rename from build-and-test-all-postgres-polling-kafka.sh rename to build-and-test-all-mssql-polling-kafka.sh index fe089fd..6aed483 100755 --- a/build-and-test-all-postgres-polling-kafka.sh +++ b/build-and-test-all-mssql-polling-kafka.sh @@ -2,10 +2,10 @@ set -e -export DATABASE=postgres +export DATABASE=mssql export MODE=polling export BROKER=kafka -. ./set-env-postgres-polling.sh +. ./set-env-mssql-polling.sh ./_build-and-test-all.sh \ No newline at end of file diff --git a/build-and-test-all-mysql-binlog-activemq.sh b/build-and-test-all-mysql-binlog-activemq.sh deleted file mode 100755 index d086b28..0000000 --- a/build-and-test-all-mysql-binlog-activemq.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/bash - -set -e - -export DATABASE=mysql -export MODE=binlog -export BROKER=activemq - -. ./set-env-mysql-binlog.sh -export SPRING_PROFILES_ACTIVE=ActiveMQ - -./_build-and-test-all.sh diff --git a/build-and-test-all-mysql-binlog-rabbitmq.sh b/build-and-test-all-mysql-binlog-rabbitmq.sh deleted file mode 100755 index 7834aaf..0000000 --- a/build-and-test-all-mysql-binlog-rabbitmq.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/bash - -set -e - -export DATABASE=mysql -export MODE=binlog -export BROKER=rabbitmq - -. ./set-env-mysql-binlog.sh -export SPRING_PROFILES_ACTIVE=RabbitMQ - -./_build-and-test-all.sh diff --git a/build-and-test-all-postgres-polling-activemq.sh b/build-and-test-all-postgres-polling-activemq.sh deleted file mode 100755 index e65ecc8..0000000 --- a/build-and-test-all-postgres-polling-activemq.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/bash - -set -e - -export DATABASE=postgres -export MODE=polling -export BROKER=activemq - -. ./set-env-postgres-polling.sh -export SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE},ActiveMQ - -./_build-and-test-all.sh \ No newline at end of file diff --git a/build-and-test-all-postgres-polling-rabbitmq.sh b/build-and-test-all-postgres-polling-rabbitmq.sh deleted file mode 100755 index f6a37df..0000000 --- a/build-and-test-all-postgres-polling-rabbitmq.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/bash - -set -e - -export DATABASE=postgres -export MODE=polling -export BROKER=rabbitmq - -. ./set-env-postgres-polling.sh -export SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE},RabbitMQ - -./_build-and-test-all.sh \ No newline at end of file diff --git a/build-and-test-all-postgres-wal-kafka.sh b/build-and-test-all-postgres-wal-kafka.sh deleted file mode 100755 index ab160e0..0000000 --- a/build-and-test-all-postgres-wal-kafka.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/bash - -set -e - -export DATABASE=postgres -export MODE=wal -export BROKER=kafka - -. ./set-env-postgres-wal.sh - -./_build-and-test-all.sh diff --git a/build-and-test-everything.sh b/build-and-test-everything.sh index 895742d..56db10d 100755 --- a/build-and-test-everything.sh +++ b/build-and-test-everything.sh @@ -2,7 +2,7 @@ set -o pipefail -SCRIPTS="./build-and-test-all-mysql-binlog-activemq.sh ./build-and-test-all-mysql-binlog-kafka.sh ./build-and-test-all-mysql-binlog-rabbitmq.sh ./build-and-test-all-postgres-polling-activemq.sh ./build-and-test-all-postgres-polling-kafka.sh ./build-and-test-all-postgres-polling-rabbitmq.sh ./build-and-test-all-postgres-wal-activemq.sh ./build-and-test-all-postgres-wal-kafka.sh ./build-and-test-all-postgres-wal-rabbitmq.sh" +SCRIPTS="./build-and-test-all-mysql-binlog-kafka.sh ./build-and-test-all-mssql-polling-kafka.sh ./build-and-test-all-postgres-wal-activemq.sh ./build-and-test-all-postgres-wal-rabbitmq.sh" date > build-and-test-everything.log diff --git a/docker-compose-mssql-polling.yml b/docker-compose-mssql-polling.yml new file mode 100755 index 0000000..8f9ec06 --- /dev/null +++ b/docker-compose-mssql-polling.yml @@ -0,0 +1,47 @@ +version: '2' +services: + zookeeper: + image: eventuateio/eventuateio-local-zookeeper:0.30.2.RELEASE + ports: + - 2181:2181 + - 2888:2888 + - 3888:3888 + + kafka: + image: eventuateio/eventuateio-local-kafka:0.30.2.RELEASE + ports: + - 9092:9092 + links: + - zookeeper + environment: + - ADVERTISED_HOST_NAME=${DOCKER_HOST_IP} + - KAFKA_HEAP_OPTS=-Xmx320m -Xms320m + - ZOOKEEPER_SERVERS=zookeeper:2181 + + mssql: + image: eventuateio/eventuate-mssql:0.4.0.RELEASE + ports: + - 1433:1433 + environment: + SA_PASSWORD: Eventuate123! + ACCEPT_EULA: Y + + cdcservice: + image: eventuateio/eventuate-tram-cdc-mysql-service:0.21.2.RELEASE + links: + - mssql + - kafka + - zookeeper + ports: + - "8099:8080" + environment: + SPRING_DATASOURCE_URL: jdbc:sqlserver://mssql:1433;databaseName=eventuate + SPRING_DATASOURCE_USERNAME: sa + SPRING_DATASOURCE_PASSWORD: Eventuate123! + SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.microsoft.sqlserver.jdbc.SQLServerDriver + EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181 + EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:9092 + EVENTUATELOCAL_CDC_DB_USER_NAME: root + EVENTUATELOCAL_CDC_DB_PASSWORD: rootpassword + EVENTUATELOCAL_CDC_READER_NAME: MsSqlReader + SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE} \ No newline at end of file diff --git a/docker-compose-mysql-binlog.yml b/docker-compose-mysql-binlog.yml index f4508cc..3fa7177 100755 --- a/docker-compose-mysql-binlog.yml +++ b/docker-compose-mysql-binlog.yml @@ -18,20 +18,6 @@ services: - KAFKA_HEAP_OPTS=-Xmx320m -Xms320m - ZOOKEEPER_SERVERS=zookeeper:2181 - activemq: - image: webcenter/activemq:5.14.3 - ports: - - 8161:8161 - - 61616:61616 - - 61613:61613 - - 1883:1883 - - 61614:61614 - - rabbitmq: - build: ./rabbitmq - ports: - - 5672:5672 - mysql: image: eventuateio/eventuate-tram-mysql:0.21.2.RELEASE ports: @@ -48,8 +34,6 @@ services: depends_on: - mysql - kafka - - activemq - - rabbitmq - zookeeper environment: SPRING_DATASOURCE_URL: jdbc:mysql://mysql/eventuate @@ -65,5 +49,3 @@ services: EVENTUATELOCAL_CDC_MYSQL_BINLOG_CLIENT_UNIQUE_ID: 1234567890 EVENTUATELOCAL_CDC_READ_OLD_DEBEZIUM_DB_OFFSET_STORAGE_TOPIC: "false" SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE} - ACTIVEMQ_URL: tcp://activemq:61616 - RABBITMQ_URL: rabbitmq diff --git a/docker-compose-postgres-polling.yml b/docker-compose-postgres-polling.yml deleted file mode 100755 index 3af9480..0000000 --- a/docker-compose-postgres-polling.yml +++ /dev/null @@ -1,69 +0,0 @@ -version: '2' -services: - zookeeper: - image: eventuateio/eventuateio-local-zookeeper:0.30.2.RELEASE - ports: - - 2181:2181 - - 2888:2888 - - 3888:3888 - - kafka: - image: eventuateio/eventuateio-local-kafka:0.30.2.RELEASE - ports: - - 9092:9092 - links: - - zookeeper - environment: - - ADVERTISED_HOST_NAME=${DOCKER_HOST_IP} - - KAFKA_HEAP_OPTS=-Xmx320m -Xms320m - - ZOOKEEPER_SERVERS=zookeeper:2181 - - activemq: - image: webcenter/activemq:5.14.3 - ports: - - 8161:8161 - - 61616:61616 - - 61613:61613 - - 1883:1883 - - 61614:61614 - - rabbitmq: - build: ./rabbitmq - ports: - - 5672:5672 - - postgres: - image: eventuateio/eventuate-tram-postgres:0.21.0.RELEASE - ports: - - 5432:5432 - environment: - POSTGRES_USER: eventuate - POSTGRES_PASSWORD: eventuate - - cdcservice: - image: eventuateio/eventuate-tram-cdc-mysql-service:0.21.2.RELEASE - links: - - postgres - - kafka - - activemq - - rabbitmq - - zookeeper - ports: - - "8099:8080" - environment: - SPRING_DATASOURCE_URL: jdbc:postgresql://postgres/eventuate - SPRING_DATASOURCE_USERNAME: eventuate - SPRING_DATASOURCE_PASSWORD: eventuate - SPRING_DATASOURCE_TEST_ON_BORROW: "true" - SPRING_DATASOURCE_VALIDATION_QUERY: SELECT 1 - SPRING_DATASOURCE_DRIVER_CLASS_NAME: org.postgresql.Driver - EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:9092 - EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181 - EVENTUATELOCAL_CDC_POLLING_INTERVAL_IN_MILLISECONDS: 500 - EVENTUATELOCAL_CDC_MAX_EVENTS_PER_POLLING: 1000 - EVENTUATELOCAL_CDC_MAX_ATTEMPTS_FOR_POLLING: 100 - EVENTUATELOCAL_CDC_POLLING_RETRY_INTERVAL_IN_MILLISECONDS: 500 - EVENTUATELOCAL_CDC_READER_NAME: PostgresPollingReader - SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE} - ACTIVEMQ_URL: tcp://activemq:61616 - RABBITMQ_URL: rabbitmq \ No newline at end of file diff --git a/docker-compose-postgres-wal.yml b/docker-compose-postgres-wal.yml index 09d84dd..a83b322 100755 --- a/docker-compose-postgres-wal.yml +++ b/docker-compose-postgres-wal.yml @@ -6,18 +6,6 @@ services: - 2181:2181 - 2888:2888 - 3888:3888 - - kafka: - image: eventuateio/eventuateio-local-kafka:0.30.2.RELEASE - ports: - - 9092:9092 - links: - - zookeeper - environment: - - ADVERTISED_HOST_NAME=${DOCKER_HOST_IP} - - KAFKA_HEAP_OPTS=-Xmx320m -Xms320m - - ZOOKEEPER_SERVERS=zookeeper:2181 - activemq: image: webcenter/activemq:5.14.3 ports: @@ -44,7 +32,6 @@ services: image: eventuateio/eventuate-tram-cdc-mysql-service:0.21.2.RELEASE links: - postgres - - kafka - activemq - rabbitmq - zookeeper @@ -57,7 +44,6 @@ services: SPRING_DATASOURCE_TEST_ON_BORROW: "true" SPRING_DATASOURCE_VALIDATION_QUERY: SELECT 1 SPRING_DATASOURCE_DRIVER_CLASS_NAME: org.postgresql.Driver - EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:9092 EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181 EVENTUATELOCAL_CDC_READER_NAME: PostgresWalReader SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE} diff --git a/eventuate-tram-examples-common/pom.xml b/eventuate-tram-examples-common/pom.xml index 12e9fce..8452ad3 100644 --- a/eventuate-tram-examples-common/pom.xml +++ b/eventuate-tram-examples-common/pom.xml @@ -13,7 +13,7 @@ io.eventuate.tram.core - eventuate-tram-messaging + eventuate-tram-messaging-spring ${eventuateTramVersion} @@ -23,7 +23,7 @@ io.eventuate.tram.core - eventuate-tram-events + eventuate-tram-events-spring ${eventuateTramVersion} diff --git a/eventuate-tram-examples-common/src/main/java/io/eventuate/tram/examples/basic/commands/TramCommandTestCommandHandler.java b/eventuate-tram-examples-common/src/main/java/io/eventuate/tram/examples/basic/commands/TramCommandTestCommandHandler.java index 6193dc6..9668d73 100644 --- a/eventuate-tram-examples-common/src/main/java/io/eventuate/tram/examples/basic/commands/TramCommandTestCommandHandler.java +++ b/eventuate-tram-examples-common/src/main/java/io/eventuate/tram/examples/basic/commands/TramCommandTestCommandHandler.java @@ -1,6 +1,9 @@ package io.eventuate.tram.examples.basic.commands; -import io.eventuate.tram.commands.consumer.*; +import io.eventuate.tram.commands.consumer.CommandHandlers; +import io.eventuate.tram.commands.consumer.CommandHandlersBuilder; +import io.eventuate.tram.commands.consumer.CommandMessage; +import io.eventuate.tram.commands.consumer.PathVariables; import io.eventuate.tram.messaging.common.Message; import static io.eventuate.tram.commands.consumer.CommandHandlerReplyBuilder.withSuccess; diff --git a/eventuate-tram-examples-common/src/main/java/io/eventuate/tram/examples/basic/events/TramEventTestEventConsumer.java b/eventuate-tram-examples-common/src/main/java/io/eventuate/tram/examples/basic/events/TramEventTestEventConsumer.java index 5c9bb50..bd838df 100644 --- a/eventuate-tram-examples-common/src/main/java/io/eventuate/tram/examples/basic/events/TramEventTestEventConsumer.java +++ b/eventuate-tram-examples-common/src/main/java/io/eventuate/tram/examples/basic/events/TramEventTestEventConsumer.java @@ -1,7 +1,6 @@ package io.eventuate.tram.examples.basic.events; import io.eventuate.tram.events.subscriber.DomainEventEnvelope; -import io.eventuate.tram.events.subscriber.DomainEventHandler; import io.eventuate.tram.events.subscriber.DomainEventHandlers; import io.eventuate.tram.events.subscriber.DomainEventHandlersBuilder; import io.eventuate.tram.examples.basic.events.domain.AccountDebited; diff --git a/eventuate-tram-examples-jdbc-kafka/build.gradle b/eventuate-tram-examples-jdbc-kafka/build.gradle index 45977e6..b843ff9 100644 --- a/eventuate-tram-examples-jdbc-kafka/build.gradle +++ b/eventuate-tram-examples-jdbc-kafka/build.gradle @@ -1,6 +1,6 @@ dependencies { - testCompile "io.eventuate.tram.core:eventuate-tram-jdbc-kafka:$eventuateTramVersion" + testCompile "io.eventuate.tram.core:eventuate-tram-jdbc-kafka-spring:$eventuateTramVersion" testCompile project(":eventuate-tram-examples-common") testCompile "org.springframework.boot:spring-boot-starter-test:$springBootVersion" diff --git a/eventuate-tram-examples-jdbc-kafka/pom.xml b/eventuate-tram-examples-jdbc-kafka/pom.xml index cd971c7..2caa7b1 100644 --- a/eventuate-tram-examples-jdbc-kafka/pom.xml +++ b/eventuate-tram-examples-jdbc-kafka/pom.xml @@ -19,7 +19,7 @@ io.eventuate.tram.core - eventuate-tram-jdbc-kafka + eventuate-tram-jdbc-kafka-spring ${eventuateTramVersion} test diff --git a/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/commands/JdbcKafkaTramCommandTestConfiguration.java b/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/commands/JdbcKafkaTramCommandTestConfiguration.java index c1e9ce2..391e496 100644 --- a/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/commands/JdbcKafkaTramCommandTestConfiguration.java +++ b/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/commands/JdbcKafkaTramCommandTestConfiguration.java @@ -1,7 +1,7 @@ package io.eventuate.tram.examples.basic.kafka.commands; -import io.eventuate.jdbckafka.TramJdbcKafkaConfiguration; import io.eventuate.tram.examples.basic.commands.AbstractTramCommandTestConfiguration; +import io.eventuate.tram.jdbckafka.TramJdbcKafkaConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/events/JdbcKafkaTramEventTestConfiguration.java b/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/events/JdbcKafkaTramEventTestConfiguration.java index 102da8d..4165c34 100644 --- a/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/events/JdbcKafkaTramEventTestConfiguration.java +++ b/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/events/JdbcKafkaTramEventTestConfiguration.java @@ -1,7 +1,7 @@ package io.eventuate.tram.examples.basic.kafka.events; -import io.eventuate.jdbckafka.TramJdbcKafkaConfiguration; import io.eventuate.tram.examples.basic.events.AbstractTramEventTestConfiguration; +import io.eventuate.tram.jdbckafka.TramJdbcKafkaConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/messages/JdbcKafkaTramMessageTestConfiguration.java b/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/messages/JdbcKafkaTramMessageTestConfiguration.java index 5eb4cf5..c4ec998 100644 --- a/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/messages/JdbcKafkaTramMessageTestConfiguration.java +++ b/eventuate-tram-examples-jdbc-kafka/src/test/java/io/eventuate/tram/examples/basic/kafka/messages/JdbcKafkaTramMessageTestConfiguration.java @@ -1,6 +1,6 @@ package io.eventuate.tram.examples.basic.kafka.messages; -import io.eventuate.jdbckafka.TramJdbcKafkaConfiguration; +import io.eventuate.tram.jdbckafka.TramJdbcKafkaConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/gradle.properties b/gradle.properties index b7fc5bb..041fe41 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,9 +2,9 @@ org.gradle.jvmargs=-XX:MaxPermSize=512m deployUrl=file:///Users/cer/.m2/testdeploy -eventuateMavenRepoUrl=https://dl.bintray.com/eventuateio-oss/eventuate-maven-release,file:///Users/cer/.m2/testdeploy +eventuateMavenRepoUrl=https://dl.bintray.com/eventuateio-oss/eventuate-maven-release,https://dl.bintray.com/eventuateio-oss/eventuate-maven-milestone,file:///Users/cer/.m2/testdeploy springBootVersion=2.1.1.RELEASE version=0.1.0-SNAPSHOT -eventuateTramVersion=0.21.0-SNAPSHOT +eventuateTramVersion=0.23.0.MICRONAUT.M2 diff --git a/mssql-cli.sh b/mssql-cli.sh new file mode 100755 index 0000000..b159c22 --- /dev/null +++ b/mssql-cli.sh @@ -0,0 +1,7 @@ +#! /bin/bash -e + +docker run $* \ + --name mssqlterm --rm \ + -e MSSQL_HOST=$DOCKER_HOST_IP \ + mcr.microsoft.com/mssql/server:2017-latest \ + sh -c 'exec /opt/mssql-tools/bin/sqlcmd -S "$MSSQL_HOST" -U SA -P "Eventuate123!"' diff --git a/pom.xml b/pom.xml index 999c331..d946313 100644 --- a/pom.xml +++ b/pom.xml @@ -13,8 +13,8 @@ UTF-8 1.8 - 0.10.0.RELEASE - 2.0.4.RELEASE + 0.23.0.MICRONAUT.M2 + 2.1.1.RELEASE @@ -53,5 +53,12 @@ true + + eventuate-milestones + https://dl.bintray.com/eventuateio-oss/eventuate-maven-milestone + + true + + diff --git a/set-env-mssql-polling.sh b/set-env-mssql-polling.sh new file mode 100644 index 0000000..db45d15 --- /dev/null +++ b/set-env-mssql-polling.sh @@ -0,0 +1,10 @@ +. ./_set-env.sh + +export EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS=$DOCKER_HOST_IP:9092 +export SPRING_DATASOURCE_URL="jdbc:sqlserver://${DOCKER_HOST_IP}:1433;databaseName=eventuate" +export SPRING_DATASOURCE_USERNAME=sa +export SPRING_DATASOURCE_PASSWORD=Eventuate123! +export SPRING_DATASOURCE_DRIVER_CLASS_NAME=com.microsoft.sqlserver.jdbc.SQLServerDriver +export EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING=$DOCKER_HOST_IP:2181 +export EVENTUATELOCAL_CDC_READER_NAME=MssqlPollingReader +export SPRING_PROFILES_ACTIVE=EventuatePolling \ No newline at end of file diff --git a/set-env-mysql-binlog.sh b/set-env-mysql-binlog.sh index ec0ea6d..7356694 100644 --- a/set-env-mysql-binlog.sh +++ b/set-env-mysql-binlog.sh @@ -1,5 +1,6 @@ . ./_set-env.sh +export EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS=$DOCKER_HOST_IP:9092 export SPRING_DATASOURCE_URL=jdbc:mysql://${DOCKER_HOST_IP}/eventuate export SPRING_DATASOURCE_USERNAME=mysqluser export SPRING_DATASOURCE_PASSWORD=mysqlpw diff --git a/set-env-postgres-polling.sh b/set-env-postgres-polling.sh deleted file mode 100644 index 68ad0a7..0000000 --- a/set-env-postgres-polling.sh +++ /dev/null @@ -1,13 +0,0 @@ -. ./_set-env.sh - -export SPRING_DATASOURCE_URL=jdbc:postgresql://${DOCKER_HOST_IP}/eventuate -export SPRING_DATASOURCE_USERNAME=eventuate -export SPRING_DATASOURCE_PASSWORD=eventuate -export SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver -export SPRING_DATASOURCE_TEST_ON_BORROW=true -export SPRING_DATASOURCE_VALIDATION_QUERY="SELECT 1" -export EVENTUATELOCAL_CDC_POLLING_INTERVAL_IN_MILLISECONDS=500 -export EVENTUATELOCAL_CDC_MAX_EVENTS_PER_POLLING=1000 -export EVENTUATELOCAL_CDC_MAX_ATTEMPTS_FOR_POLLING=100 -export EVENTUATELOCAL_CDC_POLLING_RETRY_INTERVAL_IN_MILLISECONDS=500 -export SPRING_PROFILES_ACTIVE=EventuatePolling diff --git a/set-env-postgres-wal.sh b/set-env-postgres-wal.sh index c48db62..403877a 100644 --- a/set-env-postgres-wal.sh +++ b/set-env-postgres-wal.sh @@ -1,5 +1,7 @@ . ./_set-env.sh +export ACTIVEMQ_URL=tcp://${DOCKER_HOST_IP}:61616 +export RABBITMQ_URL=${DOCKER_HOST_IP} export SPRING_DATASOURCE_URL=jdbc:postgresql://${DOCKER_HOST_IP}/eventuate export SPRING_DATASOURCE_USERNAME=eventuate export SPRING_DATASOURCE_PASSWORD=eventuate diff --git a/settings.gradle b/settings.gradle index 67187ae..e467537 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,5 +1,5 @@ include 'eventuate-tram-examples-common' -include 'eventuate-tram-examples-jdbc-kafka-spring' +include 'eventuate-tram-examples-jdbc-kafka' include 'eventuate-tram-examples-jdbc-rabbitmq' include 'eventuate-tram-examples-jdbc-activemq' include 'eventuate-tram-examples-in-memory' diff --git a/wait-for-mssql.sh b/wait-for-mssql.sh new file mode 100755 index 0000000..77aac42 --- /dev/null +++ b/wait-for-mssql.sh @@ -0,0 +1,7 @@ +#! /bin/sh + +until (echo select 1 from dual | ./mssql-cli.sh -i > /dev/null) +do + echo sleeping for mssql + sleep 5 +done