Skip to content

fix(docs): Update docs for secret filler and log when rabbit connection error #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions docs/docs/reactive-commons/9-configuration-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down
2 changes: 1 addition & 1 deletion main.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Connection> senderConnection = createConnectionMono(provider.getConnectionFactory(), appName, SENDER_TYPE);
private static SenderOptions reactiveCommonsSenderOptions(String appName, ConnectionFactoryProvider provider,
RabbitProperties rabbitProperties) {
final Mono<Connection> senderConnection = createConnectionMono(provider.getConnectionFactory(), appName,
SENDER_TYPE);
final ChannelPoolOptions channelPoolOptions = new ChannelPoolOptions();
final PropertyMapper map = PropertyMapper.get();

Expand All @@ -109,10 +111,12 @@ private static SenderOptions reactiveCommonsSenderOptions(String appName, Connec
.transform(Utils::cache));
}

private static Mono<Connection> createConnectionMono(ConnectionFactory factory, String connectionPrefix, String connectionType) {
private static Mono<Connection> 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)))
Expand Down
Loading