├── .gitignore ├── Axon.md ├── README.md ├── account-service ├── build.gradle.kts └── src │ └── main │ ├── kotlin │ └── com │ │ └── trx │ │ ├── AccountServiceApplication.kt │ │ ├── application │ │ ├── account │ │ │ └── AccountCommandService.kt │ │ └── event │ │ │ └── TransactionEventPublisher.kt │ │ ├── domain │ │ ├── entity │ │ │ └── Account.kt │ │ └── repository │ │ │ └── AccountRepository.kt │ │ ├── infrastructure │ │ ├── configuration │ │ │ ├── KafkaConsumerConfiguration.kt │ │ │ ├── KafkaProducerConfig.kt │ │ │ └── RestTemplateConfig.kt │ │ └── kafka │ │ │ └── KafkaTransactionEventPublisher.kt │ │ └── presentation │ │ ├── handler │ │ └── AccountHandler.kt │ │ ├── listener │ │ └── AccountEventListener.kt │ │ ├── request │ │ ├── AccountCreateRequest.kt │ │ └── DepositRequest.kt │ │ └── router │ │ └── AccountRouter.kt │ └── resources │ └── application.yml ├── core ├── build.gradle.kts └── src │ └── main │ ├── kotlin │ └── com │ │ └── trx │ │ ├── coroutine │ │ └── CoroutineExtensions.kt │ │ ├── errors │ │ ├── CustomException.kt │ │ ├── GlobalErrorAttributes.kt │ │ ├── GlobalErrorWebExceptionHandler.kt │ │ └── exception │ │ │ ├── AccountExceptions.kt │ │ │ ├── ProductExceptions.kt │ │ │ └── RequestExceptions.kt │ │ ├── topic │ │ ├── .DS_Store │ │ ├── Topic.kt │ │ └── event │ │ │ ├── .DS_Store │ │ │ ├── ApplyPaymentEvent.kt │ │ │ ├── ApplyPaymentResultEvent.kt │ │ │ ├── CheckProductEvent.kt │ │ │ ├── CheckProductResultEvent.kt │ │ │ ├── OrderCompleted.kt │ │ │ ├── OrderCreateEvent.kt │ │ │ ├── OrderFailed.kt │ │ │ ├── OrderRollBacked.kt │ │ │ └── ProductRollBackEvent.kt │ │ └── utils │ │ ├── MessageConverter.kt │ │ └── keyGenerator.kt │ └── resources │ └── messages │ └── message.properties ├── dockers ├── docker-compose.yml └── mysql-conf │ └── init.sql ├── gradle.properties ├── gradlew ├── gradlew.bat ├── order-orchestrator ├── build.gradle.kts └── src │ └── main │ ├── kotlin │ └── com │ │ └── trx │ │ ├── .DS_Store │ │ ├── TransactionServerApplication.kt │ │ ├── application │ │ └── event │ │ │ └── TransactionEventPublisher.kt │ │ ├── infrastructure │ │ ├── .DS_Store │ │ ├── configuration │ │ │ ├── .DS_Store │ │ │ ├── JsonConfig.kt │ │ │ ├── KafkaConsumerConfiguration.kt │ │ │ └── KafkaProducerConfig.kt │ │ └── kafka │ │ │ └── KafkaTransactionEventPublisher.kt │ │ ├── presentation │ │ └── listener │ │ │ ├── .DS_Store │ │ │ └── order │ │ │ ├── .DS_Store │ │ │ ├── OrderCreationEventListener.kt │ │ │ ├── OrderPaymentCompletedEventListener.kt │ │ │ ├── OrderPaymentFailedEventListener.kt │ │ │ ├── OrderProductCheckCompletedEventListener.kt │ │ │ ├── OrderProductCheckFailedEventListener.kt │ │ │ └── OrderRollBackedEventListener.kt │ │ └── transaction │ │ ├── .DS_Store │ │ ├── SagaInMemoryRepository.kt │ │ ├── SagaRepository.kt │ │ ├── saga │ │ └── OrderSaga.kt │ │ └── state │ │ ├── OrderPaymentCompleted.kt │ │ ├── OrderPaymentFailed.kt │ │ ├── OrderPending.kt │ │ ├── OrderProductCheckFailed.kt │ │ ├── OrderProductChecked.kt │ │ ├── OrderRollBacked.kt │ │ └── OrderSagaState.kt │ └── resources │ └── application.yml ├── order-service ├── build.gradle.kts └── src │ └── main │ ├── .DS_Store │ ├── kotlin │ ├── .DS_Store │ └── com │ │ └── trx │ │ ├── .DS_Store │ │ ├── OrderServiceApplication.kt │ │ ├── application │ │ ├── .DS_Store │ │ ├── event │ │ │ └── TransactionEventPublisher.kt │ │ └── order │ │ │ ├── OrderCommandService.kt │ │ │ ├── OrderQueryService.kt │ │ │ └── OrderResult.kt │ │ ├── domain │ │ ├── entity │ │ │ └── Order.kt │ │ ├── enums │ │ │ └── OrderStatus.kt │ │ └── repository │ │ │ └── OrderRepository.kt │ │ ├── infrastructure │ │ ├── configuration │ │ │ ├── KafkaConsumerConfiguration.kt │ │ │ └── KafkaProducerConfig.kt │ │ ├── kafka │ │ │ └── KafkaTransactionEventPublisher.kt │ │ └── transaction │ │ │ └── .DS_Store │ │ └── presentation │ │ ├── handler │ │ └── OrderHandler.kt │ │ ├── listener │ │ ├── OrderCompletedEventListener.kt │ │ └── OrderFailedEventListener.kt │ │ ├── request │ │ └── OrderRequest.kt │ │ └── router │ │ └── OrderRouter.kt │ └── resources │ └── application.yml ├── product-service ├── build.gradle └── src │ └── main │ ├── kotlin │ └── com │ │ └── trx │ │ ├── ProductServiceApplication.kt │ │ ├── application │ │ ├── event │ │ │ └── TransactionEventPublisher.kt │ │ └── product │ │ │ └── ProductCommandService.kt │ │ ├── domain │ │ ├── entity │ │ │ └── Product.kt │ │ └── repository │ │ │ └── ProductRepository.kt │ │ ├── infrastructure │ │ ├── .DS_Store │ │ ├── configuration │ │ │ ├── .DS_Store │ │ │ ├── KafkaConsumerConfiguration.kt │ │ │ └── KafkaProducerConfig.kt │ │ └── kafka │ │ │ └── KafkaTransactionEventPublisher.kt │ │ └── presentation │ │ ├── handler │ │ └── ProductHandler.kt │ │ ├── listener │ │ ├── ProductEventListener.kt │ │ └── ProductRollBackEventListener.kt │ │ ├── request │ │ ├── ProductCreateRequest.kt │ │ └── ProductIncrementRequest.kt │ │ └── router │ │ └── ProductRouter.kt │ └── resources │ └── application.yml └── settings.gradle.kts /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/.gitignore -------------------------------------------------------------------------------- /Axon.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/Axon.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/README.md -------------------------------------------------------------------------------- /account-service/build.gradle.kts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/build.gradle.kts -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/AccountServiceApplication.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/AccountServiceApplication.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/application/account/AccountCommandService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/application/account/AccountCommandService.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/application/event/TransactionEventPublisher.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/application/event/TransactionEventPublisher.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/domain/entity/Account.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/domain/entity/Account.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/domain/repository/AccountRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/domain/repository/AccountRepository.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaConsumerConfiguration.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaConsumerConfiguration.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaProducerConfig.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaProducerConfig.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/infrastructure/configuration/RestTemplateConfig.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/infrastructure/configuration/RestTemplateConfig.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/infrastructure/kafka/KafkaTransactionEventPublisher.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/infrastructure/kafka/KafkaTransactionEventPublisher.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/presentation/handler/AccountHandler.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/presentation/handler/AccountHandler.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/presentation/listener/AccountEventListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/presentation/listener/AccountEventListener.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/presentation/request/AccountCreateRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/presentation/request/AccountCreateRequest.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/presentation/request/DepositRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/presentation/request/DepositRequest.kt -------------------------------------------------------------------------------- /account-service/src/main/kotlin/com/trx/presentation/router/AccountRouter.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/kotlin/com/trx/presentation/router/AccountRouter.kt -------------------------------------------------------------------------------- /account-service/src/main/resources/application.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/account-service/src/main/resources/application.yml -------------------------------------------------------------------------------- /core/build.gradle.kts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/build.gradle.kts -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/coroutine/CoroutineExtensions.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/coroutine/CoroutineExtensions.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/errors/CustomException.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/errors/CustomException.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/errors/GlobalErrorAttributes.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/errors/GlobalErrorAttributes.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/errors/GlobalErrorWebExceptionHandler.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/errors/GlobalErrorWebExceptionHandler.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/errors/exception/AccountExceptions.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/errors/exception/AccountExceptions.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/errors/exception/ProductExceptions.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/errors/exception/ProductExceptions.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/errors/exception/RequestExceptions.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/errors/exception/RequestExceptions.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/.DS_Store -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/Topic.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/Topic.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/event/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/event/.DS_Store -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/event/ApplyPaymentEvent.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/event/ApplyPaymentEvent.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/event/ApplyPaymentResultEvent.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/event/ApplyPaymentResultEvent.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/event/CheckProductEvent.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/event/CheckProductEvent.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/event/CheckProductResultEvent.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/event/CheckProductResultEvent.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/event/OrderCompleted.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/event/OrderCompleted.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/event/OrderCreateEvent.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/event/OrderCreateEvent.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/event/OrderFailed.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/event/OrderFailed.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/event/OrderRollBacked.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/event/OrderRollBacked.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/topic/event/ProductRollBackEvent.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/topic/event/ProductRollBackEvent.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/utils/MessageConverter.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/utils/MessageConverter.kt -------------------------------------------------------------------------------- /core/src/main/kotlin/com/trx/utils/keyGenerator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/kotlin/com/trx/utils/keyGenerator.kt -------------------------------------------------------------------------------- /core/src/main/resources/messages/message.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/core/src/main/resources/messages/message.properties -------------------------------------------------------------------------------- /dockers/docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/dockers/docker-compose.yml -------------------------------------------------------------------------------- /dockers/mysql-conf/init.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/dockers/mysql-conf/init.sql -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | kotlin.code.style=official -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/gradlew -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/gradlew.bat -------------------------------------------------------------------------------- /order-orchestrator/build.gradle.kts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/build.gradle.kts -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/.DS_Store -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/TransactionServerApplication.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/TransactionServerApplication.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/application/event/TransactionEventPublisher.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/application/event/TransactionEventPublisher.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/infrastructure/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/infrastructure/.DS_Store -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/infrastructure/configuration/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/infrastructure/configuration/.DS_Store -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/infrastructure/configuration/JsonConfig.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/infrastructure/configuration/JsonConfig.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/infrastructure/configuration/KafkaConsumerConfiguration.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/infrastructure/configuration/KafkaConsumerConfiguration.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/infrastructure/configuration/KafkaProducerConfig.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/infrastructure/configuration/KafkaProducerConfig.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/infrastructure/kafka/KafkaTransactionEventPublisher.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/infrastructure/kafka/KafkaTransactionEventPublisher.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/presentation/listener/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/presentation/listener/.DS_Store -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/.DS_Store -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderCreationEventListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderCreationEventListener.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderPaymentCompletedEventListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderPaymentCompletedEventListener.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderPaymentFailedEventListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderPaymentFailedEventListener.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderProductCheckCompletedEventListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderProductCheckCompletedEventListener.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderProductCheckFailedEventListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderProductCheckFailedEventListener.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderRollBackedEventListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/presentation/listener/order/OrderRollBackedEventListener.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/transaction/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/transaction/.DS_Store -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/transaction/SagaInMemoryRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/transaction/SagaInMemoryRepository.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/transaction/SagaRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/transaction/SagaRepository.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/transaction/saga/OrderSaga.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/transaction/saga/OrderSaga.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderPaymentCompleted.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderPaymentCompleted.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderPaymentFailed.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderPaymentFailed.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderPending.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderPending.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderProductCheckFailed.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderProductCheckFailed.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderProductChecked.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderProductChecked.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderRollBacked.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderRollBacked.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderSagaState.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/kotlin/com/trx/transaction/state/OrderSagaState.kt -------------------------------------------------------------------------------- /order-orchestrator/src/main/resources/application.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-orchestrator/src/main/resources/application.yml -------------------------------------------------------------------------------- /order-service/build.gradle.kts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/build.gradle.kts -------------------------------------------------------------------------------- /order-service/src/main/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/.DS_Store -------------------------------------------------------------------------------- /order-service/src/main/kotlin/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/.DS_Store -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/.DS_Store -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/OrderServiceApplication.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/OrderServiceApplication.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/application/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/application/.DS_Store -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/application/event/TransactionEventPublisher.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/application/event/TransactionEventPublisher.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/application/order/OrderCommandService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/application/order/OrderCommandService.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/application/order/OrderQueryService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/application/order/OrderQueryService.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/application/order/OrderResult.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/application/order/OrderResult.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/domain/entity/Order.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/domain/entity/Order.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/domain/enums/OrderStatus.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/domain/enums/OrderStatus.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/domain/repository/OrderRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/domain/repository/OrderRepository.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaConsumerConfiguration.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaConsumerConfiguration.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaProducerConfig.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaProducerConfig.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/infrastructure/kafka/KafkaTransactionEventPublisher.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/infrastructure/kafka/KafkaTransactionEventPublisher.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/infrastructure/transaction/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/infrastructure/transaction/.DS_Store -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/presentation/handler/OrderHandler.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/presentation/handler/OrderHandler.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/presentation/listener/OrderCompletedEventListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/presentation/listener/OrderCompletedEventListener.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/presentation/listener/OrderFailedEventListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/presentation/listener/OrderFailedEventListener.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/presentation/request/OrderRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/presentation/request/OrderRequest.kt -------------------------------------------------------------------------------- /order-service/src/main/kotlin/com/trx/presentation/router/OrderRouter.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/kotlin/com/trx/presentation/router/OrderRouter.kt -------------------------------------------------------------------------------- /order-service/src/main/resources/application.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/order-service/src/main/resources/application.yml -------------------------------------------------------------------------------- /product-service/build.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/build.gradle -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/ProductServiceApplication.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/ProductServiceApplication.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/application/event/TransactionEventPublisher.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/application/event/TransactionEventPublisher.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/application/product/ProductCommandService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/application/product/ProductCommandService.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/domain/entity/Product.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/domain/entity/Product.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/domain/repository/ProductRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/domain/repository/ProductRepository.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/infrastructure/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/infrastructure/.DS_Store -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/infrastructure/configuration/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/infrastructure/configuration/.DS_Store -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaConsumerConfiguration.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaConsumerConfiguration.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaProducerConfig.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/infrastructure/configuration/KafkaProducerConfig.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/infrastructure/kafka/KafkaTransactionEventPublisher.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/infrastructure/kafka/KafkaTransactionEventPublisher.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/presentation/handler/ProductHandler.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/presentation/handler/ProductHandler.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/presentation/listener/ProductEventListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/presentation/listener/ProductEventListener.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/presentation/listener/ProductRollBackEventListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/presentation/listener/ProductRollBackEventListener.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/presentation/request/ProductCreateRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/presentation/request/ProductCreateRequest.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/presentation/request/ProductIncrementRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/presentation/request/ProductIncrementRequest.kt -------------------------------------------------------------------------------- /product-service/src/main/kotlin/com/trx/presentation/router/ProductRouter.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/kotlin/com/trx/presentation/router/ProductRouter.kt -------------------------------------------------------------------------------- /product-service/src/main/resources/application.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/product-service/src/main/resources/application.yml -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beer-one/distribution-transaction-example/HEAD/settings.gradle.kts --------------------------------------------------------------------------------