Skip to content

Commit 3134d93

Browse files
authored
fix: Choreographys successWith published when receive other event (#118)
* fix: Choreography's successWith published when receive orchestrate event * docs: Netx version 0.3.7 to 0.3.8
1 parent 2cecb89 commit 3134d93

File tree

7 files changed

+14
-10
lines changed

7 files changed

+14
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<br>
88

9-
![version 0.3.7](https://img.shields.io/badge/version-0.3.7-black?labelColor=black&style=flat-square) ![jdk 17](https://img.shields.io/badge/minimum_jdk-17-orange?labelColor=black&style=flat-square) ![load-test](https://img.shields.io/badge/load%20test%2010%2C000%2C000-success-brightgreen?labelColor=black&style=flat-square)
9+
![version 0.3.8](https://img.shields.io/badge/version-0.3.8-black?labelColor=black&style=flat-square) ![jdk 17](https://img.shields.io/badge/minimum_jdk-17-orange?labelColor=black&style=flat-square) ![load-test](https://img.shields.io/badge/load%20test%2010%2C000%2C000-success-brightgreen?labelColor=black&style=flat-square)
1010
![redis--stream](https://img.shields.io/badge/-redis--stream-da2020?style=flat-square&logo=Redis&logoColor=white)
1111

1212
Redis-Stream을 지원하는 Saga frame work 입니다.

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ kotlin.code.style=official
22

33
### Project ###
44
group=org.rooftop.netx
5-
version=0.3.2
5+
version=0.3.8
66
compatibility=17
77

88
### Sonarcloud ###

src/main/kotlin/org/rooftop/netx/api/TransactionCommitEvent.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class TransactionCommitEvent internal constructor(
88
codec: Codec,
99
): TransactionEvent(transactionId, nodeName, group, event, codec) {
1010

11-
override fun copy(): TransactionEvent =
12-
TransactionJoinEvent(transactionId, nodeName, group, event, codec)
11+
override fun copy(): TransactionCommitEvent =
12+
TransactionCommitEvent(transactionId, nodeName, group, event, codec)
1313
}

src/main/kotlin/org/rooftop/netx/api/TransactionJoinEvent.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class TransactionJoinEvent internal constructor(
88
codec: Codec,
99
) : TransactionEvent(transactionId, nodeName, group, event, codec) {
1010

11-
override fun copy(): TransactionEvent =
11+
override fun copy(): TransactionJoinEvent =
1212
TransactionJoinEvent(transactionId, nodeName, group, event, codec)
1313
}

src/main/kotlin/org/rooftop/netx/api/TransactionRollbackEvent.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ class TransactionRollbackEvent internal constructor(
99
codec: Codec,
1010
) : TransactionEvent(transactionId, nodeName, group, event, codec) {
1111

12-
override fun copy(): TransactionEvent =
13-
TransactionJoinEvent(transactionId, nodeName, group, event, codec)
12+
override fun copy(): TransactionRollbackEvent =
13+
TransactionRollbackEvent(transactionId, nodeName, group, event, cause, codec)
1414
}

src/main/kotlin/org/rooftop/netx/api/TransactionStartEvent.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class TransactionStartEvent internal constructor(
88
codec: Codec,
99
) : TransactionEvent(transactionId, nodeName, group, event, codec) {
1010

11-
override fun copy(): TransactionEvent =
12-
TransactionJoinEvent(transactionId, nodeName, group, event, codec)
11+
override fun copy(): TransactionStartEvent =
12+
TransactionStartEvent(transactionId, nodeName, group, event, codec)
1313
}

src/main/kotlin/org/rooftop/netx/engine/MonoDispatchFunction.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ internal class MonoDispatchFunction(
3636
.flatMap { function.call(handler, transactionEvent) }
3737
.info("Call Mono TransactionHandler \"${name()}\" with transactionId \"${transactionEvent.transactionId}\"")
3838
.switchIfEmpty(`continue`)
39-
.doOnNext { publishNextTransaction(transactionEvent) }
39+
.doOnNext {
40+
if (isProcessable(transactionEvent)) {
41+
publishNextTransaction(transactionEvent)
42+
}
43+
}
4044
.onErrorResume {
4145
if (isNoRollbackFor(it)) {
4246
return@onErrorResume noRollbackFor

0 commit comments

Comments
 (0)