Skip to content

Commit

Permalink
Add encode-mode property
Browse files Browse the repository at this point in the history
  • Loading branch information
denis.plotnikov committed Oct 7, 2024
1 parent 1e30b69 commit 1596a1b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/exactpro/th2/FixHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1681,13 +1681,15 @@ private Map<String, String> corruptMessageStructureProcessor(ByteBuf message, Ma
metadata.put("structureMutated", "Y");
metadata.put("structureMutationKind", "header");
metadata.put("structureMutationPosition", config.getMoveHeaderConfiguration().getPosition().name());
metadata.put(ENCODE_MODE_PROPERTY_NAME, DIRTY_ENCODE_MODE_NAME);
}

if (config.getMoveTrailerConfiguration() != null) {
mutator.moveTrailer(config.getMoveTrailerConfiguration().getPosition(), message);
metadata.put("structureMutated", "Y");
metadata.put("structureMutationKind", "trailer");
metadata.put("structureMutationPosition", config.getMoveTrailerConfiguration().getPosition().name());
metadata.put(ENCODE_MODE_PROPERTY_NAME, DIRTY_ENCODE_MODE_NAME);
}

state.getMessageCorrupted().set(true);
Expand Down Expand Up @@ -1717,8 +1719,10 @@ private Map<String, String> adjustSendingTimeStrategyProcessor(ByteBuf message,
AdjustSendingTimeConfiguration config = strategy.getAdjustSendingTimeConfiguration();
metadata.put("sendingTimeUpdated", "Y");
metadata.put("sendingTimeUpdateSeconds", Long.toString(config.getAdjustDuration().toSeconds()));
metadata.put(ENCODE_MODE_PROPERTY_NAME, DIRTY_ENCODE_MODE_NAME);

updateSendingTime(message, config.getAdjustDuration(), config.getSubstract());
state.getMessageCorrupted().set(true);

return null;
}
Expand Down

0 comments on commit 1596a1b

Please sign in to comment.