diff --git a/docker-compose-mssql.yml b/docker-compose-mssql.yml index 7014a8f..6b04052 100755 --- a/docker-compose-mssql.yml +++ b/docker-compose-mssql.yml @@ -1,14 +1,14 @@ version: "3" services: zookeeper: - image: confluentinc/cp-zookeeper:5.2.4 + image: eventuateio/eventuate-zookeeper:$EVENTUATE_COMMON_VERSION ports: - 2181:2181 environment: ZOOKEEPER_CLIENT_PORT: 2181 kafka: - image: "confluentinc/cp-kafka:5.2.4" + image: "eventuateio/eventuate-kafka:$EVENTUATE_MESSAGING_KAFKA_IMAGE_VERSION" ports: - 9092:9092 depends_on: diff --git a/docker-compose-postgres.yml b/docker-compose-postgres.yml index b8a6e63..18e133a 100755 --- a/docker-compose-postgres.yml +++ b/docker-compose-postgres.yml @@ -1,14 +1,14 @@ version: "3" services: zookeeper: - image: confluentinc/cp-zookeeper:5.2.4 + image: eventuateio/eventuate-zookeeper:$EVENTUATE_COMMON_VERSION ports: - 2181:2181 environment: ZOOKEEPER_CLIENT_PORT: 2181 kafka: - image: "confluentinc/cp-kafka:5.2.4" + image: "eventuateio/eventuate-kafka:$EVENTUATE_MESSAGING_KAFKA_IMAGE_VERSION" ports: - 9092:9092 depends_on: diff --git a/eventuate-tram-sagas-quarkus-common/src/test/java/io/eventuate/tram/sagas/quarkus/common/SagaLockManagerIntegrationTest.java b/eventuate-tram-sagas-quarkus-common/src/test/java/io/eventuate/tram/sagas/quarkus/common/SagaLockManagerIntegrationTest.java index 963d16a..a1bfab5 100644 --- a/eventuate-tram-sagas-quarkus-common/src/test/java/io/eventuate/tram/sagas/quarkus/common/SagaLockManagerIntegrationTest.java +++ b/eventuate-tram-sagas-quarkus-common/src/test/java/io/eventuate/tram/sagas/quarkus/common/SagaLockManagerIntegrationTest.java @@ -10,9 +10,8 @@ import javax.inject.Inject; import java.util.Optional; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; + +import static org.junit.jupiter.api.Assertions.*; @QuarkusTest @@ -21,23 +20,23 @@ public class SagaLockManagerIntegrationTest { @Inject SagaLockManager sagaLockManager; - private IdGenerator idGenerator = new ApplicationIdGenerator(); + private final IdGenerator idGenerator = new ApplicationIdGenerator(); String sagaType = "mySagaType"; @Test public void shouldClaimLock() { - String sagaId = idGenerator.genId(null).toString(); - String target = "/target/" + idGenerator.genId(null).toString(); + String sagaId = idGenerator.genIdAsString(); + String target = "/target/" + idGenerator.genIdAsString(); assertTrue(sagaLockManager.claimLock(sagaType, sagaId, target)); } @Test public void shouldNotClaimLock() { - String sagaId1 = idGenerator.genId(null).toString(); - String sagaId2 = idGenerator.genId(null).toString(); - String target = "/target/" + idGenerator.genId(null).toString(); + String sagaId1 = idGenerator.genIdAsString(); + String sagaId2 = idGenerator.genIdAsString(); + String target = "/target/" + idGenerator.genIdAsString(); assertTrue(sagaLockManager.claimLock(sagaType, sagaId1, target)); assertFalse(sagaLockManager.claimLock(sagaType, sagaId2, target)); @@ -46,9 +45,9 @@ public void shouldNotClaimLock() { @Test public void shouldStashMessage() { - String sagaId = idGenerator.genId(null).toString(); - String target = "/target/" + idGenerator.genId(null).toString(); - String messageId = idGenerator.genId(null).toString(); + String sagaId = idGenerator.genIdAsString(); + String target = "/target/" + idGenerator.genIdAsString(); + String messageId = idGenerator.genIdAsString(); Message message = MessageBuilder.withPayload("hello").withHeader(Message.ID, messageId).build(); sagaLockManager.stashMessage(sagaType, sagaId, target, message); @@ -56,10 +55,10 @@ public void shouldStashMessage() { @Test public void shouldReleaseLockAndUnstashMessage() { - String sagaId1 = idGenerator.genId(null).toString(); - String sagaId2 = idGenerator.genId(null).toString(); - String target = "/target/" + idGenerator.genId(null).toString(); - String messageId = idGenerator.genId(null).toString(); + String sagaId1 = idGenerator.genIdAsString(); + String sagaId2 = idGenerator.genIdAsString(); + String target = "/target/" + idGenerator.genIdAsString(); + String messageId = idGenerator.genIdAsString(); assertTrue(sagaLockManager.claimLock(sagaType, sagaId1, target)); assertFalse(sagaLockManager.claimLock(sagaType, sagaId2, target)); diff --git a/eventuate-tram-sagas-quarkus-participant/src/main/java/io/eventuate/tram/sagas/quarkus/participant/SagaParticipantFactory.java b/eventuate-tram-sagas-quarkus-participant/src/main/java/io/eventuate/tram/sagas/quarkus/participant/SagaParticipantFactory.java index 938eed1..77f9b30 100755 --- a/eventuate-tram-sagas-quarkus-participant/src/main/java/io/eventuate/tram/sagas/quarkus/participant/SagaParticipantFactory.java +++ b/eventuate-tram-sagas-quarkus-participant/src/main/java/io/eventuate/tram/sagas/quarkus/participant/SagaParticipantFactory.java @@ -1,8 +1,8 @@ package io.eventuate.tram.sagas.quarkus.participant; import io.eventuate.tram.commands.common.CommandNameMapping; +import io.eventuate.tram.commands.consumer.CommandReplyProducer; import io.eventuate.tram.messaging.consumer.MessageConsumer; -import io.eventuate.tram.messaging.producer.MessageProducer; import io.eventuate.tram.sagas.common.SagaLockManager; import io.eventuate.tram.sagas.participant.SagaCommandDispatcherFactory; @@ -13,8 +13,8 @@ public class SagaParticipantFactory { @Singleton public SagaCommandDispatcherFactory sagaCommandDispatcherFactory(Instance messageConsumer, - Instance messageProducer, + Instance commandReplyProducer, SagaLockManager sagaLockManager, CommandNameMapping commandNameMapping) { - return new SagaCommandDispatcherFactory(messageConsumer.get(), messageProducer.get(), sagaLockManager, commandNameMapping); + return new SagaCommandDispatcherFactory(messageConsumer.get(), sagaLockManager, commandNameMapping, commandReplyProducer.get()); } } diff --git a/eventuate-tram-sagas-quarkus-testing-support/src/main/java/io/eventuate/tram/sagas/quarkus/testing/SagaParticipantStubManagerConfiguration.java b/eventuate-tram-sagas-quarkus-testing-support/src/main/java/io/eventuate/tram/sagas/quarkus/testing/SagaParticipantStubManagerConfiguration.java index 9ba032e..58fb4fd 100755 --- a/eventuate-tram-sagas-quarkus-testing-support/src/main/java/io/eventuate/tram/sagas/quarkus/testing/SagaParticipantStubManagerConfiguration.java +++ b/eventuate-tram-sagas-quarkus-testing-support/src/main/java/io/eventuate/tram/sagas/quarkus/testing/SagaParticipantStubManagerConfiguration.java @@ -1,8 +1,8 @@ package io.eventuate.tram.sagas.quarkus.testing; import io.eventuate.tram.commands.common.CommandNameMapping; +import io.eventuate.tram.commands.consumer.CommandReplyProducer; import io.eventuate.tram.messaging.consumer.MessageConsumer; -import io.eventuate.tram.messaging.producer.MessageProducer; import io.eventuate.tram.sagas.testing.SagaParticipantChannels; import io.eventuate.tram.sagas.testing.SagaParticipantStubManager; @@ -15,7 +15,7 @@ public class SagaParticipantStubManagerConfiguration { @Singleton public SagaParticipantStubManager sagaParticipantStubManager(Instance sagaParticipantChannels, Instance messageConsumer, - Instance messageProducer, Instance commandNameMapping) { - return new SagaParticipantStubManager(sagaParticipantChannels.get(), messageConsumer.get(), messageProducer.get(), commandNameMapping.get()); + Instance commandReplyProducer, Instance commandNameMapping) { + return new SagaParticipantStubManager(sagaParticipantChannels.get(), messageConsumer.get(), commandNameMapping.get(), commandReplyProducer.get()); } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e61f9ec..9b521d6 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-all.zip