Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev-version-1' into TH2-4991
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Smirnov-Exactpro committed Jun 19, 2024
2 parents e08bcf3 + a4768f5 commit d5052c0
Show file tree
Hide file tree
Showing 16 changed files with 595 additions and 211 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
65 changes: 62 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# th2-conn-dirty-fix (1.3.0)
# th2-conn-dirty-fix (1.7.0)

This microservice allows sending and receiving messages via FIX protocol

Expand Down Expand Up @@ -49,6 +49,13 @@ This microservice allows sending and receiving messages via FIX protocol
+ *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.
+ *connectionTimeoutOnSend* - timeout in milliseconds for sending message from queue thread
(please read about [acknowledgment timeout](https://www.rabbitmq.com/consumers.html#acknowledgement-timeout) to understand the problem).
_Default, 30000 mls._ Each failed sending attempt decreases the timeout in half (but not less than _minConnectionTimeoutOnSend_).
The timeout is reset to the original value after a successful sending attempt.
If connection is not established within the specified timeout an error will be reported.
+ *minConnectionTimeoutOnSend* - minimum value for the sending message timeout in milliseconds. _Default value is 1000 mls._

### Security settings

Expand Down Expand Up @@ -328,9 +335,61 @@ spec:

# Changelog

## 1.3.0
## 1.7.0
* Added support for th2 transport protocol
* Added configuration option for non-default book per session.

## 1.6.1

* Channel subscriptions recovery on failure
* Updated bom: `4.6.1-dev`
* Updated common: `5.10.0-dev`
* Updated common-utils: `2.2.3-dev`
* Updated conn-dirty-tcp-core: `3.5.0-dev`

## 1.5.1

* Property `th2.operation_timestamp` is added to metadata to each message
* Use mutable map for metadata when sending a messages from the handler
* Fix error when new property with operation timestamp added to the immutable map

## 1.5.0

* `minConnectionTimeoutOnSend` parameter is added.
* Sending timeout now decreases in half on each failed attempt (but not less than `minConnectionTimeoutOnSend`).

## 1.4.2
* Ungraceful session disconnect support.
* Removed NPE when session is reset by schedule.
* Use UTC time zone for sending time tag

## 1.4.1
* Timeout on send from queue thread
* Parameter `connectionTimeoutOnSend` was added

## 1.4.0
* Updated bom: `4.5.0-dev`
* Updated common: `5.4.0-dev`
* Updated common-utils: `2.2.0-dev`
* Updated grpc-lw-data-provider: `2.1.0-dev`
* Updated kotlin: `1.8.22`
* Added support for th2 transport protocol

## 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.1
* fix multiple consequent SOH characters

## 1.2.0
* loading requested messages from cradle.

## 1.1.1
Expand Down Expand Up @@ -403,4 +462,4 @@ spec:

## 0.0.2

* Supported the password encryption via `RSA` algorithm.
* Supported the password encryption via `RSA` algorithm.
72 changes: 47 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import com.github.jk1.license.filter.LicenseBundleNormalizer
import com.github.jk1.license.render.JsonReportRenderer

plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.6.21'
id 'org.jetbrains.kotlin.jvm' version '1.8.22'
id 'com.palantir.docker' version '0.25.0'
id "org.owasp.dependencycheck" version "8.2.1"
id "org.owasp.dependencycheck" version "9.0.9"
id "com.gorylenko.gradle-git-properties" version "2.4.1"
id 'com.github.jk1.dependency-license-report' version '2.5'
id "de.undercouch.download" version "5.6.0"
}

apply plugin: 'application'
Expand Down Expand Up @@ -38,51 +45,49 @@ repositories {
}

dependencies {
api platform('com.exactpro.th2:bom:4.4.0')
api platform('com.exactpro.th2:bom:4.6.1')

implementation('com.exactpro.th2:common:5.3.0-separate-executor-+') {
implementation("com.exactpro.th2:common:5.10.0-dev") {
exclude group: 'com.exactpro.th2', module: 'task-utils'
}

implementation "com.exactpro.th2:common-utils:2.1.0-transport-protocol+"

implementation "com.exactpro.th2:common-utils:2.2.3-dev"
implementation 'com.exactpro.th2:netty-bytebuf-utils:0.0.1'
implementation('com.exactpro.th2:conn-dirty-tcp-core:3.1.0-TH2-4991+') {
implementation('com.exactpro.th2:conn-dirty-tcp-core:3.5.1-TH2-4907-+') {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
because 'Projects should use only slf4j-api, without coupling to a certain implementation'
}
implementation 'com.exactpro.th2:grpc-lw-data-provider:2.0.0-dev-version-2+'
implementation 'com.exactpro.th2:grpc-lw-data-provider:2.3.1-dev'

implementation 'org.slf4j:slf4j-api'
implementation 'io.github.microutils:kotlin-logging:3.0.0' // The last version bases on kotlin 1.6.0
implementation 'io.github.microutils:kotlin-logging:3.0.5'
implementation 'org.apache.commons:commons-lang3'

implementation 'io.netty:netty-all'
implementation 'com.google.auto.service:auto-service:1.0.1'
implementation 'com.google.auto.service:auto-service:1.1.1'

implementation 'com.fasterxml.jackson.core:jackson-core'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'

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

annotationProcessor 'com.google.auto.service:auto-service:1.0.1'
kapt 'com.google.auto.service:auto-service:1.0.1'
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
kapt 'com.google.auto.service:auto-service:1.1.1'
}

test {
useJUnitPlatform()
}

application {
mainClassName 'com.exactpro.th2.conn.dirty.tcp.core.Main'
mainClass.set('com.exactpro.th2.conn.dirty.tcp.core.Main')
}

applicationName = 'service'

distTar {
archiveName "${applicationName}.tar"
archiveFileName.set("${applicationName}.tar")
}

dockerPrepare {
Expand All @@ -93,15 +98,9 @@ docker {
copySpec.from(tarTree("$buildDir/distributions/${applicationName}.tar"))
}

compileKotlin {
kotlinOptions {
jvmTarget = '11'
}
}

compileTestKotlin {
kotlinOptions {
jvmTarget = '11'
tasks.withType(KotlinCompile).configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}

Expand All @@ -110,6 +109,8 @@ dependencyCheck {
failBuildOnCVSS=5
suppressionFile="suppressions.xml"

//FIXME: we should check all used dependencies
skipConfigurations = ['kapt', 'kaptClasspath_kaptKotlin', 'kaptTest', 'kaptTestFixtures', 'annotationProcessor']
analyzers {
assemblyEnabled = false
nugetconfEnabled = false
Expand All @@ -119,4 +120,25 @@ dependencyCheck {

dependencyLocking {
lockAllConfigurations()
}

licenseReport {
def licenseNormalizerBundlePath = "$buildDir/license-normalizer-bundle.json"

if (!file(licenseNormalizerBundlePath).exists()) {
download.run {
src 'https://raw.githubusercontent.com/th2-net/.github/main/license-compliance/gradle-license-report/license-normalizer-bundle.json'
dest "$buildDir/license-normalizer-bundle.json"
overwrite false
}
}

filters = [
new LicenseBundleNormalizer(licenseNormalizerBundlePath, false)
]
renderers = [
new JsonReportRenderer('licenses.json', false),
]
excludeOwnGroup = false
allowedLicensesFile = new URL("https://raw.githubusercontent.com/th2-net/.github/main/license-compliance/gradle-license-report/allowed-licenses.json")
}
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
release_version=1.2.0
release_version=1.7.0
description='Dirty-TCP client'
vcs_url=https://github.com/th2-net/th2-conn-dirty-fix
Loading

0 comments on commit d5052c0

Please sign in to comment.