From 34143833ef564db98ef95f366dee55286e023ca8 Mon Sep 17 00:00:00 2001 From: Juan C Galvis <8420868+juancgalvis@users.noreply.github.com> Date: Fri, 27 Dec 2024 09:07:27 -0500 Subject: [PATCH 1/2] Update docs for secret filler and log when rabbit connection error --- .../reactive-commons/9-configuration-properties.md | 5 ++--- .../async/rabbit/RabbitMQSetupUtils.java | 12 ++++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/docs/reactive-commons/9-configuration-properties.md b/docs/docs/reactive-commons/9-configuration-properties.md index 5d55f9e1..d863d124 100644 --- a/docs/docs/reactive-commons/9-configuration-properties.md +++ b/docs/docs/reactive-commons/9-configuration-properties.md @@ -105,13 +105,12 @@ public class MyDomainConfig { } ``` -Additionally, if you want to set only connection properties you can use the `AsyncPropsDomain.SecretFiller` class. +Additionally, if you want to set only connection properties you can use the `AsyncPropsDomain.RabbitSecretFiller` class. ```java @Bean -@Primary -public AsyncPropsDomain.SecretFiller customFiller() { +public AsyncPropsDomain.RabbitSecretFiller customFiller() { return (domain, asyncProps) -> { // customize asyncProps here by domain }; diff --git a/starters/async-rabbit-starter/src/main/java/org/reactivecommons/async/rabbit/RabbitMQSetupUtils.java b/starters/async-rabbit-starter/src/main/java/org/reactivecommons/async/rabbit/RabbitMQSetupUtils.java index 0d102085..a88dde91 100644 --- a/starters/async-rabbit-starter/src/main/java/org/reactivecommons/async/rabbit/RabbitMQSetupUtils.java +++ b/starters/async-rabbit-starter/src/main/java/org/reactivecommons/async/rabbit/RabbitMQSetupUtils.java @@ -90,8 +90,10 @@ public static DiscardNotifier createDiscardNotifier(ReactiveMessageSender sender return new DLQDiscardNotifier(appDomainEventBus, converter); } - private static SenderOptions reactiveCommonsSenderOptions(String appName, ConnectionFactoryProvider provider, RabbitProperties rabbitProperties) { - final Mono senderConnection = createConnectionMono(provider.getConnectionFactory(), appName, SENDER_TYPE); + private static SenderOptions reactiveCommonsSenderOptions(String appName, ConnectionFactoryProvider provider, + RabbitProperties rabbitProperties) { + final Mono senderConnection = createConnectionMono(provider.getConnectionFactory(), appName, + SENDER_TYPE); final ChannelPoolOptions channelPoolOptions = new ChannelPoolOptions(); final PropertyMapper map = PropertyMapper.get(); @@ -109,10 +111,12 @@ private static SenderOptions reactiveCommonsSenderOptions(String appName, Connec .transform(Utils::cache)); } - private static Mono createConnectionMono(ConnectionFactory factory, String connectionPrefix, String connectionType) { + private static Mono createConnectionMono(ConnectionFactory factory, String connectionPrefix, + String connectionType) { return Mono.fromCallable(() -> factory.newConnection(connectionPrefix + " " + connectionType)) .doOnError(err -> - log.log(Level.SEVERE, "Error creating connection to RabbitMq Broker. Starting retry process...", err) + log.log(Level.SEVERE, "Error creating connection to RabbitMQ Broker in host" + + factory.getHost() + ". Starting retry process...", err) ) .retryWhen(Retry.backoff(Long.MAX_VALUE, Duration.ofMillis(300)) .maxBackoff(Duration.ofMillis(3000))) From d67b4d3bd4a0aca88df824b0916e182d9893c470 Mon Sep 17 00:00:00 2001 From: Juan C Galvis <8420868+juancgalvis@users.noreply.github.com> Date: Fri, 27 Dec 2024 09:29:30 -0500 Subject: [PATCH 2/2] Update deps --- build.gradle | 6 +++--- main.gradle | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 1bf774f3..732ba3fb 100644 --- a/build.gradle +++ b/build.gradle @@ -12,10 +12,10 @@ buildscript { plugins { id 'jacoco' - id 'org.sonarqube' version '6.0.0.5145' - id 'org.springframework.boot' version '3.4.0' apply false + id 'org.sonarqube' version '6.0.1.5171' + id 'org.springframework.boot' version '3.4.1' apply false id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' - id 'co.com.bancolombia.cleanArchitecture' version '3.20.2' + id 'co.com.bancolombia.cleanArchitecture' version '3.20.7' } repositories { diff --git a/main.gradle b/main.gradle index c6da6a54..86094ef5 100644 --- a/main.gradle +++ b/main.gradle @@ -80,7 +80,7 @@ subprojects { dependencyManagement { imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.4.0' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.4.1' } }