diff --git a/README.md b/README.md index 0c1b60a..6c91ce5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# th2-conn-dirty-fix (1.4.1) +# th2-conn-dirty-fix (1.4.2) This microservice allows sending and receiving messages via FIX protocol @@ -333,6 +333,10 @@ spec: memory: 100Mi cpu: 20m ``` +## 1.4.2 + +* Add property `encode-mode: dirty` for messages that are corrupted with transformation strategies: `TRANSFORM_MESSAGE_STRATEGY`, `INVALID_CHECKSUM` and `TRANSFORM_LOGON` + ## 1.4.1 * Use keep open gRPC query to recover messages for Resend Request diff --git a/build.gradle b/build.gradle index a71b4c5..5f68075 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "application" - id "com.exactpro.th2.gradle.component" version "0.1.1" + id "com.exactpro.th2.gradle.component" version "0.1.3" id 'org.jetbrains.kotlin.jvm' version '1.8.22' id "org.jetbrains.kotlin.kapt" version "1.8.22" } diff --git a/src/main/java/com/exactpro/th2/FixHandler.java b/src/main/java/com/exactpro/th2/FixHandler.java index d22b726..78dbaf0 100644 --- a/src/main/java/com/exactpro/th2/FixHandler.java +++ b/src/main/java/com/exactpro/th2/FixHandler.java @@ -205,6 +205,8 @@ public class FixHandler implements AutoCloseable, IHandler { private static final String STUBBING_VALUE = "XXX"; private static final String SPLIT_SEND_TIMESTAMPS_PROPERTY = "BufferSlicesSendingTimes"; private static final String STRATEGY_EVENT_TYPE = "StrategyState"; + private static final String ENCODE_MODE_PROPERTY_NAME = "encode-mode"; + private static final String DIRTY_ENCODE_MODE_NAME = "dirty"; private static final DateTimeFormatter formatter = DateTimeFormatter.ISO_INSTANT; private static final ObjectMapper mapper = new ObjectMapper(); @@ -1577,6 +1579,9 @@ private Map defaultOutgoingStrategy(ByteBuf message, Map transformOutgoingMessageStrategy(ByteBuf message, Map metadata) { onOutgoingUpdateTag(message, metadata); transformProcessor(message, metadata); + + metadata.put(ENCODE_MODE_PROPERTY_NAME, DIRTY_ENCODE_MODE_NAME); + return null; }