This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit ccbd93c158941c9e48b6481b7b88f51b12c50153 Author: Benoit TELLIER <[email protected]> AuthorDate: Thu Jan 8 09:01:17 2026 +0100 JAMES-4159 Spring fixes --- event-bus/api/src/main/java/org/apache/james/events/EventBus.java | 2 +- mailbox/spring/src/main/resources/META-INF/spring/event-system.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/event-bus/api/src/main/java/org/apache/james/events/EventBus.java b/event-bus/api/src/main/java/org/apache/james/events/EventBus.java index 1fda2f2ad8..19f3c98fa2 100644 --- a/event-bus/api/src/main/java/org/apache/james/events/EventBus.java +++ b/event-bus/api/src/main/java/org/apache/james/events/EventBus.java @@ -34,7 +34,7 @@ import reactor.core.publisher.Mono; public interface EventBus { record Configuration(int executionRate, Optional<Duration> executionTimeout) { - + public static Configuration DEFAULT = new Configuration(EXECUTION_RATE, Optional.empty()); } int EXECUTION_RATE = 10; diff --git a/mailbox/spring/src/main/resources/META-INF/spring/event-system.xml b/mailbox/spring/src/main/resources/META-INF/spring/event-system.xml index 47768e548d..779956ac0f 100644 --- a/mailbox/spring/src/main/resources/META-INF/spring/event-system.xml +++ b/mailbox/spring/src/main/resources/META-INF/spring/event-system.xml @@ -25,6 +25,8 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> + <util:constant id="eventBusConfiguration" static-field="org.apache.james.events.EventBus$Configuration.DEFAULT"/> + <bean id="event-bus" class="org.apache.james.events.InVMEventBus" lazy-init="true"> <constructor-arg index="0" ref="event-delivery"/> <constructor-arg index="1"> @@ -34,6 +36,7 @@ </bean> <bean id="event-delivery" class="org.apache.james.events.delivery.InVmEventDelivery" lazy-init="true"> <constructor-arg index="0" ref="metricFactory"/> + <constructor-arg index="1" ref="eventBusConfiguration"/> </bean> <bean id="event-deadletters" class="org.apache.james.events.MemoryEventDeadLetters" lazy-init="true"/> </beans> \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
