diff --git a/build.gradle b/build.gradle index 4bcfbd3..0ced0b2 100644 --- a/build.gradle +++ b/build.gradle @@ -62,6 +62,8 @@ subprojects { implementation "com.mx.path-core:common" testImplementation "com.mx.path-core:testing" testImplementation "org.junit.jupiter:junit-jupiter-api:[5.9.0,5.10.0)" + testRuntimeOnly "org.junit.platform:junit-platform-launcher" + } test { useJUnitPlatform() } diff --git a/encryption-service-jasypt/gradle.lockfile b/encryption-service-jasypt/gradle.lockfile index e68d51c..21e0095 100644 --- a/encryption-service-jasypt/gradle.lockfile +++ b/encryption-service-jasypt/gradle.lockfile @@ -63,10 +63,10 @@ org.antlr:antlr4-runtime:4.7.2=pmd org.antlr:antlr4-runtime:4.8-1=checkstyle org.apache.bcel:bcel:6.6.1=spotbugs org.apache.commons:commons-lang3:3.13.0=spotbugs -org.apache.commons:commons-lang3:3.17.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-lang3:3.18.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.commons:commons-lang3:3.8.1=pmd org.apache.commons:commons-text:1.10.0=spotbugs -org.apache.commons:commons-text:1.13.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-text:1.14.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy-bom:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.httpcomponents.client5:httpclient5:5.1.3=spotbugs @@ -94,6 +94,7 @@ org.junit.jupiter:junit-jupiter-api:5.12.2=testCompileClasspath,testRuntimeClass org.junit.jupiter:junit-jupiter-engine:5.12.2=testRuntimeClasspath org.junit.platform:junit-platform-commons:1.12.2=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.12.2=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-launcher:1.12.2=testRuntimeClasspath org.junit:junit-bom:5.12.2=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:5.9.0=runtimeClasspath org.mockito:mockito-core:4.11.0=testCompileClasspath,testRuntimeClasspath diff --git a/encryption-service-vault/gradle.lockfile b/encryption-service-vault/gradle.lockfile index 945cf4d..268d327 100644 --- a/encryption-service-vault/gradle.lockfile +++ b/encryption-service-vault/gradle.lockfile @@ -65,10 +65,10 @@ org.antlr:antlr4-runtime:4.7.2=pmd org.antlr:antlr4-runtime:4.8-1=checkstyle org.apache.bcel:bcel:6.6.1=spotbugs org.apache.commons:commons-lang3:3.13.0=spotbugs -org.apache.commons:commons-lang3:3.17.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-lang3:3.18.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.commons:commons-lang3:3.8.1=pmd org.apache.commons:commons-text:1.10.0=spotbugs -org.apache.commons:commons-text:1.13.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-text:1.14.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy-bom:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.httpcomponents.client5:httpclient5:5.1.3=spotbugs @@ -95,6 +95,7 @@ org.junit.jupiter:junit-jupiter-api:5.12.2=testCompileClasspath,testRuntimeClass org.junit.jupiter:junit-jupiter-engine:5.12.2=testRuntimeClasspath org.junit.platform:junit-platform-commons:1.12.2=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.12.2=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-launcher:1.12.2=testRuntimeClasspath org.junit:junit-bom:5.12.2=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:5.9.0=runtimeClasspath org.mockito:mockito-core:4.11.0=testCompileClasspath,testRuntimeClasspath diff --git a/exception-reporter-honeybadger/gradle.lockfile b/exception-reporter-honeybadger/gradle.lockfile index 0e887a1..936ea0d 100644 --- a/exception-reporter-honeybadger/gradle.lockfile +++ b/exception-reporter-honeybadger/gradle.lockfile @@ -75,10 +75,10 @@ org.antlr:antlr4-runtime:4.7.2=pmd org.antlr:antlr4-runtime:4.8-1=checkstyle org.apache.bcel:bcel:6.6.1=spotbugs org.apache.commons:commons-lang3:3.13.0=spotbugs -org.apache.commons:commons-lang3:3.17.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-lang3:3.18.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.commons:commons-lang3:3.8.1=pmd org.apache.commons:commons-text:1.10.0=spotbugs -org.apache.commons:commons-text:1.13.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-text:1.14.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy-bom:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.httpcomponents.client5:httpclient5:5.1.3=spotbugs @@ -106,6 +106,7 @@ org.junit.jupiter:junit-jupiter-api:5.12.2=testCompileClasspath,testRuntimeClass org.junit.jupiter:junit-jupiter-engine:5.12.2=testRuntimeClasspath org.junit.platform:junit-platform-commons:1.12.2=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.12.2=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-launcher:1.12.2=testRuntimeClasspath org.junit:junit-bom:5.12.2=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:5.9.0=runtimeClasspath org.mockito:mockito-core:3.4.6=compileClasspath,runtimeClasspath diff --git a/fault-tolerant-executor-resilience4j/gradle.lockfile b/fault-tolerant-executor-resilience4j/gradle.lockfile index a94c3e2..1249386 100644 --- a/fault-tolerant-executor-resilience4j/gradle.lockfile +++ b/fault-tolerant-executor-resilience4j/gradle.lockfile @@ -72,10 +72,10 @@ org.antlr:antlr4-runtime:4.7.2=pmd org.antlr:antlr4-runtime:4.8-1=checkstyle org.apache.bcel:bcel:6.6.1=spotbugs org.apache.commons:commons-lang3:3.13.0=spotbugs -org.apache.commons:commons-lang3:3.17.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-lang3:3.18.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.commons:commons-lang3:3.8.1=pmd org.apache.commons:commons-text:1.10.0=spotbugs -org.apache.commons:commons-text:1.13.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-text:1.14.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy-bom:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.httpcomponents.client5:httpclient5:5.1.3=spotbugs @@ -102,6 +102,7 @@ org.junit.jupiter:junit-jupiter-api:5.12.2=testCompileClasspath,testRuntimeClass org.junit.jupiter:junit-jupiter-engine:5.12.2=testRuntimeClasspath org.junit.platform:junit-platform-commons:1.12.2=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.12.2=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-launcher:1.12.2=testRuntimeClasspath org.junit:junit-bom:5.12.2=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:5.9.0=runtimeClasspath org.mockito:mockito-core:4.11.0=testCompileClasspath,testRuntimeClasspath diff --git a/message-broker-nats/gradle.lockfile b/message-broker-nats/gradle.lockfile index fb7c57d..0923bab 100644 --- a/message-broker-nats/gradle.lockfile +++ b/message-broker-nats/gradle.lockfile @@ -66,10 +66,10 @@ org.antlr:antlr4-runtime:4.7.2=pmd org.antlr:antlr4-runtime:4.8-1=checkstyle org.apache.bcel:bcel:6.6.1=spotbugs org.apache.commons:commons-lang3:3.13.0=spotbugs -org.apache.commons:commons-lang3:3.17.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-lang3:3.18.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.commons:commons-lang3:3.8.1=pmd org.apache.commons:commons-text:1.10.0=spotbugs -org.apache.commons:commons-text:1.13.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-text:1.14.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy-bom:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.httpcomponents.client5:httpclient5:5.1.3=spotbugs @@ -99,6 +99,7 @@ org.junit.jupiter:junit-jupiter-api:5.12.2=testCompileClasspath,testRuntimeClass org.junit.jupiter:junit-jupiter-engine:5.12.2=testRuntimeClasspath org.junit.platform:junit-platform-commons:1.12.2=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.12.2=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-launcher:1.12.2=testRuntimeClasspath org.junit:junit-bom:5.12.2=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:5.9.0=runtimeClasspath org.mockito:mockito-core:4.11.0=testCompileClasspath,testRuntimeClasspath diff --git a/store-redis/gradle.lockfile b/store-redis/gradle.lockfile index 824cd8c..7199796 100644 --- a/store-redis/gradle.lockfile +++ b/store-redis/gradle.lockfile @@ -46,13 +46,13 @@ info.picocli:picocli:4.1.4=checkstyle io.github.cdimascio:dotenv-java:2.3.2=testRuntimeClasspath io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath io.lettuce:lettuce-core:6.2.0.RELEASE=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-buffer:4.1.123.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-codec:4.1.123.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-common:4.1.123.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-handler:4.1.123.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-resolver:4.1.123.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-transport-native-unix-common:4.1.123.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.netty:netty-transport:4.1.123.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-buffer:4.1.128.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-codec:4.1.128.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-common:4.1.128.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-handler:4.1.128.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-resolver:4.1.128.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-transport-native-unix-common:4.1.128.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-transport:4.1.128.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.opentracing:opentracing-api:0.33.0=testRuntimeClasspath io.opentracing:opentracing-noop:0.33.0=testRuntimeClasspath io.opentracing:opentracing-util:0.33.0=testRuntimeClasspath @@ -73,10 +73,10 @@ org.antlr:antlr4-runtime:4.7.2=pmd org.antlr:antlr4-runtime:4.8-1=checkstyle org.apache.bcel:bcel:6.6.1=spotbugs org.apache.commons:commons-lang3:3.13.0=spotbugs -org.apache.commons:commons-lang3:3.17.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-lang3:3.18.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.commons:commons-lang3:3.8.1=pmd org.apache.commons:commons-text:1.10.0=spotbugs -org.apache.commons:commons-text:1.13.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-text:1.14.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy-bom:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.httpcomponents.client5:httpclient5:5.1.3=spotbugs @@ -103,6 +103,7 @@ org.junit.jupiter:junit-jupiter-api:5.12.2=testCompileClasspath,testRuntimeClass org.junit.jupiter:junit-jupiter-engine:5.12.2=testRuntimeClasspath org.junit.platform:junit-platform-commons:1.12.2=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.12.2=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-launcher:1.12.2=testRuntimeClasspath org.junit:junit-bom:5.12.2=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:5.9.0=runtimeClasspath org.mockito:mockito-core:4.11.0=testCompileClasspath,testRuntimeClasspath diff --git a/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStore.java b/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStore.java index 1929310..4d799f5 100644 --- a/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStore.java +++ b/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStore.java @@ -1,6 +1,7 @@ package com.mx.path.service.facility.store.redis; import java.io.File; +import java.time.Duration; import java.util.Set; import java.util.function.Function; @@ -16,6 +17,7 @@ import io.lettuce.core.SslOptions; import io.lettuce.core.api.StatefulRedisConnection; import io.lettuce.core.cluster.ClusterClientOptions; +import io.lettuce.core.cluster.ClusterTopologyRefreshOptions; import io.lettuce.core.cluster.RedisClusterClient; import io.lettuce.core.cluster.api.StatefulRedisClusterConnection; import io.lettuce.core.protocol.ProtocolVersion; @@ -28,6 +30,8 @@ public class RedisStore implements Store { private static final String PUT_UNSUPPORTED_OPERATION = "Put operations must have an expiration"; + private static final long REDIS_REFRESH_INTERVAL = 3; + @Getter private final RedisStoreConfiguration configuration; @Getter @@ -223,10 +227,15 @@ final synchronized StatefulRedisClusterConnection buildClusterCo .build(); RedisClusterClient redisClusterClient = RedisClusterClient.create(resources, redisUri); + ClusterTopologyRefreshOptions topologyRefreshOptions = ClusterTopologyRefreshOptions.builder() + .enablePeriodicRefresh(Duration.ofMinutes(REDIS_REFRESH_INTERVAL)) + .enableAllAdaptiveRefreshTriggers() + .build(); SslOptions sslOptions = SslOptions.builder() .keyManager(new File(configuration.getCertFile()), new File(configuration.getKeyFile()), configuration.getPasswordFile().toCharArray()) .build(); ClusterClientOptions clusterClientOptions = ClusterClientOptions.builder() + .topologyRefreshOptions(topologyRefreshOptions) .sslOptions(sslOptions).build(); redisClusterClient.setOptions(clusterClientOptions); diff --git a/store-vault/gradle.lockfile b/store-vault/gradle.lockfile index 945cf4d..268d327 100644 --- a/store-vault/gradle.lockfile +++ b/store-vault/gradle.lockfile @@ -65,10 +65,10 @@ org.antlr:antlr4-runtime:4.7.2=pmd org.antlr:antlr4-runtime:4.8-1=checkstyle org.apache.bcel:bcel:6.6.1=spotbugs org.apache.commons:commons-lang3:3.13.0=spotbugs -org.apache.commons:commons-lang3:3.17.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-lang3:3.18.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.commons:commons-lang3:3.8.1=pmd org.apache.commons:commons-text:1.10.0=spotbugs -org.apache.commons:commons-text:1.13.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-text:1.14.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy-bom:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.groovy:groovy:4.0.26=testCompileClasspath,testRuntimeClasspath org.apache.httpcomponents.client5:httpclient5:5.1.3=spotbugs @@ -95,6 +95,7 @@ org.junit.jupiter:junit-jupiter-api:5.12.2=testCompileClasspath,testRuntimeClass org.junit.jupiter:junit-jupiter-engine:5.12.2=testRuntimeClasspath org.junit.platform:junit-platform-commons:1.12.2=testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.12.2=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-launcher:1.12.2=testRuntimeClasspath org.junit:junit-bom:5.12.2=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:5.9.0=runtimeClasspath org.mockito:mockito-core:4.11.0=testCompileClasspath,testRuntimeClasspath