Skip to content

Commit b738bf4

Browse files
committed
Merge branch 'axon-multitenancy-4.10.x'
# Conflicts: # multitenancy-spring-boot-autoconfigure/pom.xml # multitenancy-spring-boot-autoconfigure/src/main/java/org/axonframework/extensions/multitenancy/autoconfig/MultiTenancyAxonServerAutoConfiguration.java # multitenancy-spring-boot-starter/pom.xml # multitenancy/pom.xml # multitenancy/src/main/java/org/axonframework/extensions/multitenancy/configuration/MultiTenantEventProcessingModule.java # pom.xml
2 parents 95ef21a + ee14efc commit b738bf4

File tree

3 files changed

+114
-42
lines changed

3 files changed

+114
-42
lines changed

docs/reference/modules/ROOT/pages/release-notes.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,26 @@ See the link:https://github.com/AxonFramework/extension-multitenancy/releases/ta
1212

1313
== Patch releases
1414

15+
=== Release 4.10.3
16+
17+
==== Bug fixes
18+
19+
- Pass through missing span factories link:https://github.com/AxonFramework/extension-multitenancy/pull/232[#232]
20+
21+
==== Contributors
22+
23+
We'd like to thank all the contributors who worked on this release!
24+
25+
- link:https://github.com/sandjelkovic[@sandjelkovic]
26+
1527
=== Release 4.10.2
28+
1629
Enhances the flexibility and security of the MultiTenantDataSourceManager
1730

1831
See the link:https://github.com/AxonFramework/extension-multitenancy/releases/tag/axon-multi-tenancy-4.10.2[GitHub release notes] for an exhaustive list of all changes.
1932

2033
=== Release 4.10.1
34+
2135
Fixes the Spring Boot Aut-configuration ordering
2236

2337
See the link:https://github.com/AxonFramework/extension-multitenancy/releases/tag/axon-multi-tenancy-4.10.1[GitHub release notes] for an exhaustive list of all changes.

multitenancy-spring-boot-autoconfigure/src/main/java/org/axonframework/extensions/multitenancy/autoconfig/MultiTenancyAxonServerAutoConfiguration.java

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
import org.axonframework.axonserver.connector.event.axon.EventProcessorInfoConfiguration;
2727
import org.axonframework.axonserver.connector.query.AxonServerQueryBus;
2828
import org.axonframework.axonserver.connector.query.QueryPriorityCalculator;
29-
import org.axonframework.commandhandling.*;
29+
import org.axonframework.commandhandling.CommandBus;
30+
import org.axonframework.commandhandling.CommandBusSpanFactory;
31+
import org.axonframework.commandhandling.CommandMessage;
32+
import org.axonframework.commandhandling.DuplicateCommandHandlerResolver;
33+
import org.axonframework.commandhandling.SimpleCommandBus;
3034
import org.axonframework.commandhandling.distributed.RoutingStrategy;
3135
import org.axonframework.common.transaction.TransactionManager;
3236
import org.axonframework.config.Configuration;
@@ -42,7 +46,13 @@
4246
import org.axonframework.extensions.multitenancy.components.queryhandeling.TenantQueryUpdateEmitterSegmentFactory;
4347
import org.axonframework.extensions.multitenancy.components.scheduling.TenantEventSchedulerSegmentFactory;
4448
import org.axonframework.messaging.interceptors.CorrelationDataInterceptor;
45-
import org.axonframework.queryhandling.*;
49+
import org.axonframework.queryhandling.QueryBus;
50+
import org.axonframework.queryhandling.QueryBusSpanFactory;
51+
import org.axonframework.queryhandling.QueryInvocationErrorHandler;
52+
import org.axonframework.queryhandling.QueryMessage;
53+
import org.axonframework.queryhandling.QueryUpdateEmitter;
54+
import org.axonframework.queryhandling.SimpleQueryBus;
55+
import org.axonframework.queryhandling.SimpleQueryUpdateEmitter;
4656
import org.axonframework.serialization.Serializer;
4757
import org.axonframework.spring.config.SpringAxonConfiguration;
4858
import org.axonframework.springboot.autoconfig.AxonServerAutoConfiguration;
@@ -95,15 +105,16 @@ public TenantProvider tenantProvider(Environment env,
95105
axonServerConnectionManager);
96106
}
97107

98-
private SimpleCommandBus localCommandBus(TransactionManager txManager, Configuration axonConfiguration,
99-
DuplicateCommandHandlerResolver duplicateCommandHandlerResolver) {
108+
private SimpleCommandBus localCommandBus(TransactionManager txManager,
109+
Configuration axonConfiguration,
110+
DuplicateCommandHandlerResolver duplicateCommandHandlerResolver) {
100111
SimpleCommandBus commandBus =
101112
SimpleCommandBus.builder()
102-
.transactionManager(txManager)
103-
.duplicateCommandHandlerResolver(duplicateCommandHandlerResolver)
104-
.spanFactory(axonConfiguration.getComponent(CommandBusSpanFactory.class))
105-
.messageMonitor(axonConfiguration.messageMonitor(CommandBus.class, "commandBus"))
106-
.build();
113+
.transactionManager(txManager)
114+
.duplicateCommandHandlerResolver(duplicateCommandHandlerResolver)
115+
.spanFactory(axonConfiguration.getComponent(CommandBusSpanFactory.class))
116+
.messageMonitor(axonConfiguration.messageMonitor(CommandBus.class, "commandBus"))
117+
.build();
107118
commandBus.registerHandlerInterceptor(
108119
new CorrelationDataInterceptor<>(axonConfiguration.correlationDataProviders())
109120
);
@@ -124,19 +135,22 @@ public TenantCommandSegmentFactory tenantAxonServerCommandSegmentFactory(
124135
DuplicateCommandHandlerResolver duplicateCommandHandlerResolver
125136
) {
126137
return tenantDescriptor -> {
127-
SimpleCommandBus localCommandBus = localCommandBus(txManager, axonConfiguration, duplicateCommandHandlerResolver);
128-
AxonServerCommandBus commandBus = AxonServerCommandBus.builder()
129-
.localSegment(localCommandBus)
130-
.serializer(messageSerializer)
131-
.routingStrategy(routingStrategy)
132-
.priorityCalculator(priorityCalculator)
133-
.loadFactorProvider(loadFactorProvider)
134-
.spanFactory(axonConfiguration.getComponent(CommandBusSpanFactory.class))
135-
.targetContextResolver(targetContextResolver)
136-
.axonServerConnectionManager(connectionManager)
137-
.configuration(axonServerConfig)
138-
.defaultContext(tenantDescriptor.tenantId())
139-
.build();
138+
SimpleCommandBus localCommandBus = localCommandBus(txManager,
139+
axonConfiguration,
140+
duplicateCommandHandlerResolver);
141+
AxonServerCommandBus commandBus =
142+
AxonServerCommandBus.builder()
143+
.localSegment(localCommandBus)
144+
.serializer(messageSerializer)
145+
.routingStrategy(routingStrategy)
146+
.priorityCalculator(priorityCalculator)
147+
.loadFactorProvider(loadFactorProvider)
148+
.spanFactory(axonConfiguration.getComponent(CommandBusSpanFactory.class))
149+
.targetContextResolver(targetContextResolver)
150+
.axonServerConnectionManager(connectionManager)
151+
.configuration(axonServerConfig)
152+
.defaultContext(tenantDescriptor.tenantId())
153+
.build();
140154
commandBus.start();
141155
return commandBus;
142156
};

0 commit comments

Comments
 (0)