This is an automated email from the ASF dual-hosted git repository.
adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new b0a9bcb3ec FINERACT-2181: Use `disruptor` only if it is configured
b0a9bcb3ec is described below
commit b0a9bcb3ec8d281d67def8594074ac9db92166a2
Author: Adam Saghy <[email protected]>
AuthorDate: Fri May 23 16:58:53 2025 +0200
FINERACT-2181: Use `disruptor` only if it is configured
---
.../java/org/apache/fineract/command/starter/CommandConfiguration.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/fineract-command/src/main/java/org/apache/fineract/command/starter/CommandConfiguration.java
b/fineract-command/src/main/java/org/apache/fineract/command/starter/CommandConfiguration.java
index b2de1a6bcb..f16969b20a 100644
---
a/fineract-command/src/main/java/org/apache/fineract/command/starter/CommandConfiguration.java
+++
b/fineract-command/src/main/java/org/apache/fineract/command/starter/CommandConfiguration.java
@@ -29,6 +29,7 @@ import org.apache.fineract.command.core.CommandProperties;
import org.apache.fineract.command.core.CommandRouter;
import org.apache.fineract.command.implementation.DisruptorCommandExecutor;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import
org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@@ -42,11 +43,13 @@ class CommandConfiguration {
@Bean
@ConditionalOnMissingBean
+ @ConditionalOnProperty(value = "fineract.command.executor", havingValue =
"disruptor")
WaitStrategy waitStrategy() {
return new YieldingWaitStrategy();
}
@Bean
+ @ConditionalOnProperty(value = "fineract.command.executor", havingValue =
"disruptor")
Disruptor<?> disruptor(CommandProperties properties, WaitStrategy
waitStrategy, List<CommandMiddleware> middlewares,
CommandRouter router) {
// TODO: make this more configurable