Skip to content

Commit

Permalink
Merge pull request #17 from th2-net/ts-1225
Browse files Browse the repository at this point in the history
Ts 1225
  • Loading branch information
Nikita-Smirnov-Exactpro authored Feb 10, 2023
2 parents 839526e + 513e7e3 commit cc79e79
Show file tree
Hide file tree
Showing 15 changed files with 640 additions and 252 deletions.
62 changes: 39 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,26 @@
# th2-conn-dirty-fix (0.0.2)
# th2-conn-dirty-fix (0.0.4)

This microservice allows sending and receiving messages via FIX protocol

## Configuration

+ *autoStart* - enables/disable auto-starting of session on box start (`true` by default)
+ *autoStopAfter* - time in seconds after which session will be automatically stopped (`0` by default = disabled)
+ *sessions* - list of session settings
+ *maxBatchSize* - max size of outgoing message batch (`1000` by default)
+ *maxFlushTime* - max message batch flush time (`1000` by default)
+ *publishSentEvents* - enables/disables publish of "message sent" events (`true` by default)
+ *publishConnectEvents* - enables/disables publish of "connect/disconnect" events (`true` by default)
+ *sessions* - list of session settings

## Session settings

+ *sessionAlias* - session alias for incoming/outgoing th2 messages
+ *host* - service host
+ *port* - service port
+ *security* - connection security settings
+ *maxMessageRate* - max outgoing message rate for this session (unlimited by default)
+ *autoReconnect* - enables/disables auto-reconnect (`true` by default)
+ *reconnectDelay* - delay between reconnects (`5000` by default)
+ *handler* - handler settings
+ *mangler* - mangler settings
### Security settings

+ *ssl* - enables SSL on connection (`false` by default)
+ *sni* - enables SNI support (`false` by default)
+ *certFile* - path to server certificate (`null` by default)
+ *acceptAllCerts* - accept all server certificates (`false` by default, takes precedence over `certFile`)

## Handler settings

+ *host* - service host
+ *port* - service port
+ *security* - connection security settings
+ *beginString* - defines the start of a new message and the protocol version
+ *heartBtInt* - message waiting interval
+ *senderCompID* - ID of the sender of the message
Expand All @@ -51,6 +40,18 @@ This microservice allows sending and receiving messages via FIX protocol
+ *disconnectRequestDelay* - the interval for the shutdown request
+ *resetSeqNumFlag* - resetting sequence number in initial Logon message (when conn started)
+ *resetOnLogon* - resetting the sequence number in Logon in other cases (e.g. disconnect)
+ *stateFilePath* - path to file where sequences will be saved to use with next login attempts. It is useful when acceptor does not support sequence reset. (`nullable`)
+ *sessionStartTime* - UTC time when session starts. (`nullable`)
+ *sessionEndTime* - UTC time when session ends. required if startSessionTime is filled.
+ *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)

### Security settings

+ *ssl* - enables SSL on connection (`false` by default)
+ *sni* - enables SNI support (`false` by default)
+ *certFile* - path to server certificate (`null` by default)
+ *acceptAllCerts* - accept all server certificates (`false` by default, takes precedence over `certFile`)

## Mangler settings

Expand Down Expand Up @@ -222,9 +223,7 @@ spec:
image-version: 0.0.1
type: th2-conn
custom-config:
autoStart: true
autoStopAfter: 0
maxBatchSize: 100
maxBatchSize: 1000
maxFlushTime: 1000
publishSentEvents: true
publishConnectEvents: true
Expand Down Expand Up @@ -283,18 +282,28 @@ spec:
settings:
storageOnDemand: false
queueLength: 1000
- name: outgoing_messages
- name: incoming_messages
connection-type: mq
attributes:
- second
- publish
- store
- raw
- name: incoming_messages
filters:
- metadata:
- field-name: direction
expected-value: FIRST
operation: EQUAL
- name: outgoing_messages
connection-type: mq
attributes:
- first
- publish
- store
- raw
filters:
- metadata:
- field-name: direction
expected-value: SECOND
operation: EQUAL
extended-settings:
externalBox:
enabled: false
Expand All @@ -311,6 +320,13 @@ spec:

# Changelog

## 0.0.4
* Session management based on NextExpectedSeqNum field.
* Recovery handling
* outgoing messages are now saved
* if message wasn't saved sequence reset message with gap fill mode flag is sent.
* Session start and Session end configuration to handle sequence reset by exchange schedule.

## 0.0.3

* Added new password option into settings
Expand Down
30 changes: 20 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ version release_version
sourceCompatibility = 11
targetCompatibility = 11

ext {
sharedDir = file("${project.rootDir}/shared")
}

repositories {
maven {
name 'MavenLocal'
url sharedDir
}
mavenCentral()

maven {
Expand All @@ -36,18 +44,20 @@ repositories {
}

dependencies {
// api platform('com.exactpro.th2:bom:4.0.2')
api platform('com.exactpro.th2:bom:3.1.0')
api platform('com.exactpro.th2:bom:4.1.0')

implementation 'com.exactpro.th2:conn-dirty-tcp-core:1.0.0'
implementation 'com.exactpro.th2:common:3.31.1'
// implementation 'com.exactpro.th2:common:3.42.1-TH2-2212-common-cannot-recover-channel-level-exceptions-3540133251-SNAPSHOT'
implementation 'com.exactpro.th2:common:3.44.0'
implementation 'com.exactpro.th2:netty-bytebuf-utils:0.0.1'
implementation ('com.exactpro.th2:conn-dirty-tcp-core:2.0.5') {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
because 'Projects should use only slf4j-api, without coupling to a certain implementation'
}

implementation 'org.slf4j:slf4j-api:1.7.33'
implementation 'io.github.microutils:kotlin-logging:2.1.21'
implementation 'org.slf4j:slf4j-api'
implementation 'io.github.microutils:kotlin-logging:2.1.23'

implementation 'io.netty:netty-all:4.1.72.Final'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0'
implementation 'io.netty:netty-all:4.1.86.Final'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21'
implementation 'com.google.auto.service:auto-service:1.0.1'

implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: jackson_version
Expand All @@ -56,7 +66,7 @@ dependencies {
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: jackson_version

testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5:1.6.21'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5:1.7.10'

annotationProcessor 'com.google.auto.service:auto-service:1.0.1'
kapt 'com.google.auto.service:auto-service:1.0.1'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
release_version=0.0.3
release_version=0.0.4
jackson_version=2.11.2
Loading

0 comments on commit cc79e79

Please sign in to comment.