Skip to content

Commit

Permalink
Add publishing confirmation to redeliver messages that were not confi… (
Browse files Browse the repository at this point in the history
  • Loading branch information
OptimumCode authored Jun 6, 2024
1 parent 7ea3bd4 commit 236125c
Show file tree
Hide file tree
Showing 10 changed files with 955 additions and 76 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Run integration tests for common"

on:
push:
branches:
- '*'

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 'zulu' '11'
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew --info integrationTest
- uses: actions/upload-artifact@v4
if: failure()
with:
name: integration-test-results
path: build/reports/tests/integrationTest/
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# th2 common library (Java) (5.12.0)
# th2 common library (Java) (5.13.0)

## Usage

Expand Down Expand Up @@ -511,6 +511,15 @@ dependencies {

## Release notes

### 5.13.0-dev

+ Added functionality for publisher confirmations to mitigate network issues for message producers.
+ New parameters are added to connection manager configuration:
+ enablePublisherConfirmation - enables publisher confirmation. `false` by default.
+ maxInflightPublicationsBytes - the max number of unconfirmed published messages per channel. `52428800` (50 MB), by default.
+ heartbeatIntervalSeconds - rabbitmq connection heartbeat interval in seconds.
`0` by default (that means the default interval will be set by the internal library used to communicate with RabbitMQ).

### 5.12.0-dev

+ Updated kubernetes-client: `6.12.1`
Expand Down
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ dependencies {
testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") {
because("system property tests")
}
testImplementation("org.awaitility:awaitility:4.2.1")

testFixturesImplementation "org.jetbrains.kotlin:kotlin-test-junit5:$kotlin_version"
testFixturesImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
Expand Down Expand Up @@ -206,4 +207,12 @@ tasks.named('extractIncludeProto') {enabled = false }
tasks.named('extractIncludeTestFixturesProto') {enabled = false }

compileTestJava.dependsOn.add('generateTestProto')
processTestResources.dependsOn.add('generateTestProto')
processTestResources.dependsOn.add('generateTestProto')

tasks.register("publicationManualBench", JavaExec.class) {
mainClass.set('com.exactpro.th2.common.schema.message.impl.rabbitmq.connection.ConnectionManualBenchmark')
classpath(sourceSets.test.runtimeClasspath)
dependsOn('testClasses')

jvmArgs('-XX:StartFlightRecording=duration=60s,settings=profile,filename=publishing-profile-record.jfr')
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
release_version=5.12.0
release_version=5.13.0
kotlin_version=1.8.22
description='th2 common library (Java)'
vcs_url=https://github.com/th2-net/th2-common-j
kapt.include.compile.classpath=false
kapt.include.compile.classpath=false
Loading

0 comments on commit 236125c

Please sign in to comment.