Skip to content

Commit

Permalink
Merge remote-tracking branch 'original/dev-version-1' into affected_m…
Browse files Browse the repository at this point in the history
…essages_event
  • Loading branch information
Denis Plotnikov committed Oct 11, 2023
2 parents 13088a1 + 6f8d220 commit c27000b
Show file tree
Hide file tree
Showing 14 changed files with 878 additions and 158 deletions.
1 change: 0 additions & 1 deletion .github/workflows/dev-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches-ignore:
- master
- version-*
- dev-version-*
- dependabot**
paths-ignore:
- README.md
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/dev-release-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ name: Build and publish dev-release Java distributions to sonatype.
on:
workflow_dispatch:
push:
branches:
- dev-version-*
paths:
- gradle.properties
tags:
- \d+.\d+.\d+-dev

jobs:
build-job:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- master
- version-*
- dev-version-*
paths:
- gradle.properties
# - package_info.json
Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ This microservice allows sending and receiving messages via FIX protocol
+ *resetSeqNumFlag* - resetting sequence number in initial Logon message (when conn started)
+ *resetOnLogon* - resetting the sequence number in Logon in other cases (e.g. disconnect)
+ *loadSequencesFromCradle* - defines if sequences will be loaded from cradle to use them in logon message.
+ *loadMissedMessagesFromCradle* - defines how retransmission will be handled. If true, then requested through `ResendRequest` messages (or messages requested on Logon with `NextExpectedSeqNum`) will be loaded from cradle.
+ *sessionStartTime* - UTC time when session starts. (`nullable`)
+ *sessionEndTime* - UTC time when session ends. required if startSessionTime is filled.
+ *sendingDateTimeFormat* - `SendingTime` field format for outgoing messages. (`nullable`, `default format` in this case is `"yyyyMMdd-HH:mm:ss.SSSSSSSSS"`)
+ *useNextExpectedSeqNum* - session management based on next expected sequence number. (`false` by default)
+ *saveAdminMessages* - defines if admin messages will be saved to internal outgoing buffer. (`false` by default)
+ *resetStateOnServerReset* - whether to reset the server sequence after receiving logout with text `Next Expected MSN too high, MSN to be sent is x but received y`.
+ *logoutOnIncorrectServerSequence* - whether to logout session when server send message with sequence number less than expected. If `false` then internal conn sequence will be reset to sequence number from server message.

### Security settings

Expand Down Expand Up @@ -327,6 +329,32 @@ spec:
```

# Changelog
### 1.4.1
* Use UTC time zone for sending time tag

### 1.4.0
* Ungraceful session disconnect support.
* Removed NPE when session is reset by schedule.

### 1.3.2
* Improve logging: log session group and session alias for each log message.

# 1.3.1
* fix multiple consequent SOH characters

## 1.3.0
* Added handling for incoming test request messages
* Fixed resetSeqNum flag handling on incoming logon messages.
* Added option to automatically reset server sequence when internal conn sequence doesn't match with sequence that server sent.

## 1.2.0
* loading requested messages from cradle.

## 1.1.1
* fix scheduling: hasn't worked for some ranges.

## 1.1.0
* state reset option on server update.

## 1.2.0
* Added support for th2 transport protocol
Expand All @@ -345,6 +373,12 @@ spec:
## 1.0.0
* Bump `conn-dirty-tcp-core` to `3.0.0` for books and pages support

<<<<<<< HEAD
=======
## 0.3.0
* Ability to recover messages from cradle.

>>>>>>> original/dev-version-1
## 0.2.0
* optional state reset on silent server reset.

Expand Down
222 changes: 174 additions & 48 deletions src/main/java/com/exactpro/th2/FixHandler.java

Large diffs are not rendered by default.

19 changes: 14 additions & 5 deletions src/main/java/com/exactpro/th2/FixHandlerSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ public class FixHandlerSettings implements IHandlerSettings {
private Boolean resetSeqNumFlag = false;
private Boolean resetOnLogon = false;
private Boolean useNextExpectedSeqNum = false;
private Boolean saveAdminMessages = false;
private Boolean loadSequencesFromCradle = false;
private Boolean loadMissedMessagesFromCradle = false;
private Boolean resetStateOnServerReset = false;
private Boolean logoutOnIncorrectServerSequence = false;

@JsonDeserialize(using = LocalTimeDeserializer.class)
private LocalTime sessionStartTime;
Expand Down Expand Up @@ -238,6 +239,14 @@ public void setLoadSequencesFromCradle(Boolean loadSequencesFromCradle) {
this.loadSequencesFromCradle = loadSequencesFromCradle;
}

public Boolean isLoadMissedMessagesFromCradle() {
return loadMissedMessagesFromCradle;
}

public void setLoadMissedMessagesFromCradle(Boolean loadMissedMessagesFromCradle) {
this.loadMissedMessagesFromCradle = loadMissedMessagesFromCradle;
}

public Boolean getResetStateOnServerReset() {
return resetStateOnServerReset;
}
Expand All @@ -254,12 +263,12 @@ public void setUseNextExpectedSeqNum(Boolean useNextExpectedSeqNum) {
this.useNextExpectedSeqNum = useNextExpectedSeqNum;
}

public Boolean isSaveAdminMessages() {
return saveAdminMessages;
public Boolean isLogoutOnIncorrectServerSequence() {
return logoutOnIncorrectServerSequence;
}

public void setSaveAdminMessages(Boolean saveAdminMessages) {
this.saveAdminMessages = saveAdminMessages;
public void setLogoutOnIncorrectServerSequence(Boolean logoutOnIncorrectServerSequence) {
this.logoutOnIncorrectServerSequence = logoutOnIncorrectServerSequence;
}

public LocalTime getSessionStartTime() {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/exactpro/th2/constants/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public class Constants {
public static final String RESET_SEQ_NUM = SOH + RESET_SEQ_NUM_TAG + "=";
public static final String NEXT_EXPECTED_SEQ_NUM = SOH + NEXT_EXPECTED_SEQ_NUMBER_TAG + "=";
public static final String POSS_DUP = SOH + POSS_DUP_TAG + "=";
public static final String TEXT = SOH + TEXT_TAG + "=";

//message types
public static final String MSG_TYPE_LOGON = "A";
Expand All @@ -99,5 +100,6 @@ public class Constants {
);

public static final String IS_POSS_DUP = "Y";
public static final String IS_SEQUENCE_RESET_FLAG = "Y";
public static final int SUCCESSFUL_LOGOUT_CODE = 4;
}
Loading

0 comments on commit c27000b

Please sign in to comment.