From 1852df8906df914beddee7e7a156ad4d2d7cfa34 Mon Sep 17 00:00:00 2001 From: YvonneCeelie Date: Mon, 26 Sep 2022 09:33:05 +0200 Subject: [PATCH 01/24] Updated not working code samples --- .../events/event-processors/README.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/axon-framework/events/event-processors/README.md b/axon-framework/events/event-processors/README.md index a08a3100..93990ddf 100644 --- a/axon-framework/events/event-processors/README.md +++ b/axon-framework/events/event-processors/README.md @@ -307,12 +307,12 @@ A `JpaSequencedDeadLetterQueue` configuration example: ```java public class DeadLetterQueueExampleConfig { - public ConfigurerModule configureDeadLetterQueueFor(String processingGroup) { + public ConfigurerModule configureDeadLetterQueueFor(EventProcessingConfigurer configurer) { return configurer -> configurer.eventProcessing( eventProcessingConfigurer -> eventProcessingConfigurer.registerDeadLetterQueue( - processingGroup, + "MyProcessingGroup", configuration -> JpaSequencedDeadLetterQueue.builder() - .processingGroup(processingGroup) + .processingGroup("MyProcessingGroup") .maxSequences(256) .maxSequenceSize(256) .entityManagerProvider(configuration.getComponent(EntityManagerProvider.class)) @@ -331,12 +331,12 @@ public class DeadLetterQueueExampleConfig { public class DeadLetterQueueExampleConfig { @Autowired - public ConfigurerModule configureDeadLetterQueueFor(String processingGroup) { + public ConfigurerModule configureDeadLetterQueueFor(EventProcessingConfigurer configurer) { return configurer -> configurer.eventProcessing( eventProcessingConfigurer -> eventProcessingConfigurer.registerDeadLetterQueue( - processingGroup, + "MyProcessingGroup", configuration -> JpaSequencedDeadLetterQueue.builder() - .processingGroup(processingGroup) + .processingGroup("MyProcessingGroup") .maxSequences(256) .maxSequenceSize(256) .entityManagerProvider(configuration.getComponent(EntityManagerProvider.class)) @@ -507,8 +507,8 @@ See the following example for configuring our custom policy: ```java public class EnqueuePolicyConfigurer { - public void configureEnqueuePolicy(EventProcessingConfigurer configurer, String processingGroup) { - configurer.registerDeadLetterPolicy(processingGroup, config -> new MyEnqueuePolicy()); + public void configureEnqueuePolicy(EventProcessingConfigurer configurer) { + configurer.registerDeadLetterPolicy("MyProcessingGroup", config -> new MyEnqueuePolicy()); } } ``` @@ -519,9 +519,9 @@ public class EnqueuePolicyConfigurer { public class EnqueuePolicyConfigurer { @Bean - public ConfigurerModule configureEnqueuePolicy(String processingGroup) { + public ConfigurerModule configureEnqueuePolicy(EventProcessingConfigurer configurer) { return configurer -> configurer.eventProcessing() - .registerDeadLetterPolicy(processingGroup, config -> new MyEnqueuePolicy()); + .registerDeadLetterPolicy("MyProcessingGroup", config -> new MyEnqueuePolicy()); } } ``` From 2c5f9206f3a10551ce34975e072d724d12a05488 Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Thu, 6 Oct 2022 16:08:00 +0200 Subject: [PATCH 02/24] Add AF 4.6.1 release notes Add AF 4.6.1 release notes --- release-notes/rn-axon-framework/README.md | 3 +- .../rn-axon-framework/rn-af-minor-releases.md | 61 +++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/release-notes/rn-axon-framework/README.md b/release-notes/rn-axon-framework/README.md index 72357ae1..3001b163 100644 --- a/release-notes/rn-axon-framework/README.md +++ b/release-notes/rn-axon-framework/README.md @@ -11,7 +11,8 @@ The release notes section for the Axon framework for all major/minor releases. | | [4.2](rn-af-major-releases.md#release-42) | | | [4.1](rn-af-major-releases.md#release-41) | | | [4.0](rn-af-major-releases.md#release-40) | -| _**Minor**_ | [4.5](rn-af-minor-releases.md#release-45) | +| _**Minor**_ | [4.6](rn-af-minor-releases.md#release-46) | +| | [4.5](rn-af-minor-releases.md#release-45) | | | [4.4](rn-af-minor-releases.md#release-44) | | | [4.3](rn-af-minor-releases.md#release-43) | | | [4.2](rn-af-minor-releases.md#release-42) | diff --git a/release-notes/rn-axon-framework/rn-af-minor-releases.md b/release-notes/rn-axon-framework/rn-af-minor-releases.md index d7e76352..81f45734 100644 --- a/release-notes/rn-axon-framework/rn-af-minor-releases.md +++ b/release-notes/rn-axon-framework/rn-af-minor-releases.md @@ -2,6 +2,67 @@ Any patch release made for an Axon project is tailored towards resolving bugs. This page aims to provide a dedicated overview of patch releases per project. +## Release 4.6 + +### Release 4.6.1 + +#### Enhancements + +- Added ConditionalOnMissingBean to AutoConfiguration [#2414](https://github.com/AxonFramework/AxonFramework/pull/2414) +- Add `ConditionalOnMissingBean` to `AxonServerActuatorAutoConfigurationis` [#2411](https://github.com/AxonFramework/AxonFramework/issues/2411) + +#### Bug Fixes + +- Only return unique sequence identifiers in deadLetters call of JPA DLQ [#2428](https://github.com/AxonFramework/AxonFramework/pull/2428) +- autowiring command model Repository results in NoSuchBeanDefinitionException in 4.6.0 [#2426](https://github.com/AxonFramework/AxonFramework/issues/2426) +- Deadlines bug [#2424](https://github.com/AxonFramework/AxonFramework/pull/2424) +- [#1211] Add `Cache#computeIfPresent` and use in `CachingSagaStore` for Association Values [#2423](https://github.com/AxonFramework/AxonFramework/pull/2423) +- Renamed size column name in JdbcTokenStore [#2413](https://github.com/AxonFramework/AxonFramework/pull/2413) +- [#2393] Move retrieval of Command Handler to the end of the InterceptorChain [#2412](https://github.com/AxonFramework/AxonFramework/pull/2412) +- JdbcTokenStore uses query that contains reserved word in oracle [#2409](https://github.com/AxonFramework/AxonFramework/issues/2409) +- [#2389] Make constructors accessible in `NoArgumentConstructorCreationPolicyAggregateFactory` [#2407](https://github.com/AxonFramework/AxonFramework/pull/2407) +- Rename index column to sequenceIndex [#2401](https://github.com/AxonFramework/AxonFramework/pull/2401) +- [#2396] Deadletter logging changes [#2398](https://github.com/AxonFramework/AxonFramework/pull/2398) +- Dead Letter Queue implementations can leak personal data to log [#2396](https://github.com/AxonFramework/AxonFramework/issues/2396) +- CommandHandlerInterceptor annotated method in aggregate root doesn't work when command handling entity not created [#2393](https://github.com/AxonFramework/AxonFramework/issues/2393) +- [#2382] Disable batch optimization for token-based event reading [#2390](https://github.com/AxonFramework/AxonFramework/pull/2390) +- Aggregates no longer allow private/protected no-arg constructors [#2389](https://github.com/AxonFramework/AxonFramework/issues/2389) +- Events are not processed when optimize-event-consumption is disabled [#2382](https://github.com/AxonFramework/AxonFramework/issues/2382) +- [#2367] Fix Repository beans not being registered to the Spring application context [#2370](https://github.com/AxonFramework/AxonFramework/pull/2370) +- [#2364] Fix framework failing to start due to a `ClassNotFoundException` [#2369](https://github.com/AxonFramework/AxonFramework/pull/2369) +- Fix GA for Slack release announcement [#2368](https://github.com/AxonFramework/AxonFramework/pull/2368) +- Aggregate `org.axonframework.modelling.command.Repository` bean not available in Spring context [#2367](https://github.com/AxonFramework/AxonFramework/issues/2367) +- Event storage engines cannot be used without XStream [#2364](https://github.com/AxonFramework/AxonFramework/issues/2364) +- Concurrency conflicts in CachingSagaStore [#1211](https://github.com/AxonFramework/AxonFramework/issues/1211) + +#### Dependency Upgrade + +- Bump testcontainers.version from 1.17.4 to 1.17.5 [#2425](https://github.com/AxonFramework/AxonFramework/pull/2425) +- Bump axonserver-connector-java from 4.6.1 to 4.6.2 [#2419](https://github.com/AxonFramework/AxonFramework/pull/2419) +- Upgrade to `axonserver-connector-java` 4.6.2 [#2416](https://github.com/AxonFramework/AxonFramework/pull/2416) +- Bump testcontainers.version from 1.17.3 to 1.17.4 [#2415](https://github.com/AxonFramework/AxonFramework/pull/2415) +- Bump slf4j.version from 2.0.2 to 2.0.3 [#2408](https://github.com/AxonFramework/AxonFramework/pull/2408) +- Bump hibernate-core.version from 5.6.11.Final to 5.6.12.Final [#2405](https://github.com/AxonFramework/AxonFramework/pull/2405) +- Bump joda-time from 2.11.0 to 2.11.2 [#2395](https://github.com/AxonFramework/AxonFramework/pull/2395) +- Bump spring.boot.version from 2.7.3 to 2.7.4 [#2392](https://github.com/AxonFramework/AxonFramework/pull/2392) +- Bump joda-time from 2.11.0 to 2.11.1 [#2391](https://github.com/AxonFramework/AxonFramework/pull/2391) +- Bump slf4j.version from 2.0.1 to 2.0.2 [#2388](https://github.com/AxonFramework/AxonFramework/pull/2388) +- Bump javassist from 3.29.0-GA to 3.29.2-GA [#2387](https://github.com/AxonFramework/AxonFramework/pull/2387) +- Bump jackson-bom from 2.13.3 to 2.13.4 [#2386](https://github.com/AxonFramework/AxonFramework/pull/2386) +- Bump byte-buddy.version from 1.12.16 to 1.12.17 [#2385](https://github.com/AxonFramework/AxonFramework/pull/2385) +- Bump junit.jupiter.version from 5.9.0 to 5.9.1 [#2384](https://github.com/AxonFramework/AxonFramework/pull/2384) +- Bump maven-bundle-plugin from 5.1.4 to 5.1.8 [#2381](https://github.com/AxonFramework/AxonFramework/pull/2381) +- Bump maven-javadoc-plugin from 3.4.0 to 3.4.1 [#2380](https://github.com/AxonFramework/AxonFramework/pull/2380) +- Bump micrometer-core from 1.9.3 to 1.9.4 [#2379](https://github.com/AxonFramework/AxonFramework/pull/2379) +- Bump metrics-core from 4.2.9 to 4.2.12 [#2378](https://github.com/AxonFramework/AxonFramework/pull/2378) +- Bump hibernate-core.version from 5.6.10.Final to 5.6.11.Final [#2377](https://github.com/AxonFramework/AxonFramework/pull/2377) +- Bump byte-buddy.version from 1.12.13 to 1.12.16 [#2376](https://github.com/AxonFramework/AxonFramework/pull/2376) +- Bump maven-assembly-plugin from 3.4.0 to 3.4.2 [#2375](https://github.com/AxonFramework/AxonFramework/pull/2375) +- Bump maven-install-plugin from 3.0.0 to 3.0.1 [#2374](https://github.com/AxonFramework/AxonFramework/pull/2374) +- Bump slf4j.version from 2.0.0 to 2.0.1 [#2373](https://github.com/AxonFramework/AxonFramework/pull/2373) +- Bump spring.boot.version from 2.7.2 to 2.7.3 [#2372](https://github.com/AxonFramework/AxonFramework/pull/2372) +- Bump spring-framework-bom from 5.3.22 to 5.3.23 [#2366](https://github.com/AxonFramework/AxonFramework/pull/2366) + ## Release 4.5 ### Release 4.5.15 From c9f22cb54d9250bd2c05b9c61737a7dec9171dad Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Thu, 13 Oct 2022 15:42:06 +0200 Subject: [PATCH 03/24] Add Multi-Tenancy extesions 4.6.1 release notes Add Multi-Tenancy extesions 4.6.1 release notes --- .../rn-extensions/rn-multi-tenancy/README.md | 1 + .../rn-multi-tenancy-minor-releases.md | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 release-notes/rn-extensions/rn-multi-tenancy/rn-multi-tenancy-minor-releases.md diff --git a/release-notes/rn-extensions/rn-multi-tenancy/README.md b/release-notes/rn-extensions/rn-multi-tenancy/README.md index 4f1886d4..fb8b35d1 100644 --- a/release-notes/rn-extensions/rn-multi-tenancy/README.md +++ b/release-notes/rn-extensions/rn-multi-tenancy/README.md @@ -5,3 +5,4 @@ The release notes section for the Axon Multi-Tenancy Extension for all major/min | Release Type | Version | |:-------------|:-----------------------------------------------------| | _**Major**_ | [4.6](rn-multi-tenancy-major-releases.md#release-46) | +| _**Minor**_ | [4.6](rn-multi-tenancy-minor-releases.md#release-46) | diff --git a/release-notes/rn-extensions/rn-multi-tenancy/rn-multi-tenancy-minor-releases.md b/release-notes/rn-extensions/rn-multi-tenancy/rn-multi-tenancy-minor-releases.md new file mode 100644 index 00000000..ba0701a6 --- /dev/null +++ b/release-notes/rn-extensions/rn-multi-tenancy/rn-multi-tenancy-minor-releases.md @@ -0,0 +1,29 @@ +# Minor Releases + +This page notes all enhancements and features that we have introduced to our major releases of the Axon Multi-Tenancy Extension. + +## Release 4.6 + +### Release 4.6.1 + +#### Bug Fixes + +- Not resolving Tenant outside UoW [#33](https://github.com/AxonFramework/extension-multitenancy/pull/33) +- Moved TenantConfiguration to multitenancy module [#28](https://github.com/AxonFramework/extension-multitenancy/pull/28) + +#### Dependency Upgrade + +- Bump projectreactor.version from 3.4.23 to 3.4.24 [#35](https://github.com/AxonFramework/extension-multitenancy/pull/35) +- Bump axon.version from 4.6.0 to 4.6.1 [#34](https://github.com/AxonFramework/extension-multitenancy/pull/34) +- Bump actions/setup-java from 3.5.0 to 3.5.1 [#32](https://github.com/AxonFramework/extension-multitenancy/pull/32) +- Bump spring.boot.version from 2.7.3 to 2.7.4 [#31](https://github.com/AxonFramework/extension-multitenancy/pull/31) +- Bump junit-jupiter from 5.9.0 to 5.9.1 [#29](https://github.com/AxonFramework/extension-multitenancy/pull/29) +- Bump spring.web.version from 5.3.9 to 5.3.22 [#11](https://github.com/AxonFramework/extension-multitenancy/pull/11) + +#### Contributors + +We'd like to thank all the contributors who worked on this release! + +- [@YvonneCeelie](https://github.com/YvonneCeelie) +- [@schananas](https://github.com/schananas) + From bb6b7a2829f4101599f95e9bf0bce7e4409540d8 Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Thu, 13 Oct 2022 15:51:57 +0200 Subject: [PATCH 04/24] Add Tracing extesions 4.6.1 release notes Add Tracing extesions 4.6.1 release notes --- .../rn-extensions/rn-tracing/README.md | 3 ++- .../rn-tracing/rn-tracing-minor-releases.md | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/release-notes/rn-extensions/rn-tracing/README.md b/release-notes/rn-extensions/rn-tracing/README.md index 7e8c927a..3cbb20fd 100644 --- a/release-notes/rn-extensions/rn-tracing/README.md +++ b/release-notes/rn-extensions/rn-tracing/README.md @@ -11,6 +11,7 @@ The release notes section for the Axon Tracing Extension for all major/minor rel | | [4.2](rn-tracing-major-releases.md#release-42---milestone) | | | [4.1](rn-tracing-major-releases.md#release-41---milestone) | | | [4.0](rn-tracing-major-releases.md#release-40---milestone) | -| _**Minor**_ | [4.5](rn-tracing-minor-releases.md#release-45) | +| _**Minor**_ | [4.6](rn-tracing-minor-releases.md#release-46) | +| | [4.5](rn-tracing-minor-releases.md#release-45) | | | [4.3](rn-tracing-minor-releases.md#release-43) | diff --git a/release-notes/rn-extensions/rn-tracing/rn-tracing-minor-releases.md b/release-notes/rn-extensions/rn-tracing/rn-tracing-minor-releases.md index 0ce3e8b6..688e128e 100644 --- a/release-notes/rn-extensions/rn-tracing/rn-tracing-minor-releases.md +++ b/release-notes/rn-extensions/rn-tracing/rn-tracing-minor-releases.md @@ -3,6 +3,32 @@ Any patch release made for an Axon project aims to resolve bugs. This page provides an overview of patch releases for the Axon Tracing Extension. +## Release 4.6 + +### Release 4.6.1 + +#### Bug Fixes + +- Move Flux tracing to utils class [#330](https://github.com/AxonFramework/extension-tracing/pull/330) + +#### Dependency Upgrade + +- Bump reactor.version from 3.4.23 to 3.4.24 [#328](https://github.com/AxonFramework/extension-tracing/pull/328) +- Bump axon.version from 4.6.0 to 4.6.1 [#327](https://github.com/AxonFramework/extension-tracing/pull/327) +- Bump kotlin.version from 1.7.10 to 1.7.20 [#326](https://github.com/AxonFramework/extension-tracing/pull/326) +- Bump slf4j.version from 2.0.2 to 2.0.3 [#325](https://github.com/AxonFramework/extension-tracing/pull/325) +- Bump actions/setup-java from 3.5.0 to 3.5.1 [#324](https://github.com/AxonFramework/extension-tracing/pull/324) +- Bump spring.boot.version from 2.7.3 to 2.7.4 [#323](https://github.com/AxonFramework/extension-tracing/pull/323) +- Bump slf4j.version from 2.0.1 to 2.0.2 [#322](https://github.com/AxonFramework/extension-tracing/pull/322) +- Bump junit-jupiter from 5.9.0 to 5.9.1 [#321](https://github.com/AxonFramework/extension-tracing/pull/321) +- Bump slf4j.version from 2.0.0 to 2.0.1 [#317](https://github.com/AxonFramework/extension-tracing/pull/317) + +#### Contributors + +We'd like to thank all the contributors who worked on this release! + +- [@Morlack](https://github.com/Morlack) + ## Release 4.5 ### Release 4.5.2 From 447d4799d2c084afa0d67fae5b159a3c116fbcde Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Thu, 13 Oct 2022 15:53:24 +0200 Subject: [PATCH 05/24] Add JGroups and MultiTenancy minor release link to summary Add JGroups and MultiTenancy minor release link to summary --- SUMMARY.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SUMMARY.md b/SUMMARY.md index 815754a9..f01a3361 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -21,6 +21,7 @@ * [Major Releases](release-notes/rn-extensions/rn-cdi/rn-cdi-major-releases.md) * [JGroups](release-notes/rn-extensions/rn-jgroups/README.md) * [Major Releases](release-notes/rn-extensions/rn-jgroups/rn-jgroups-major-releases.md) + * [Minor Releases](release-notes/rn-extensions/rn-jgroups/rn-jgroups-minor-releases.md) * [Kafka](release-notes/rn-extensions/rn-kafka/README.md) * [Major Releases](release-notes/rn-extensions/rn-kafka/rn-kafka-major-releases.md) * [Minor Releases](release-notes/rn-extensions/rn-kafka/rn-kafka-minor-releases.md) @@ -32,6 +33,7 @@ * [Minor Releases](release-notes/rn-extensions/rn-mongo/rn-mongo-minor-releases.md) * [Multi-Tenancy](release-notes/rn-extensions/rn-multi-tenancy/README.md) * [Major Releases](release-notes/rn-extensions/rn-multi-tenancy/rn-multi-tenancy-major-releases.md) + * [Minor Releases](release-notes/rn-extensions/rn-multi-tenancy/rn-multi-tenancy-minor-releases.md) * [Reactor](release-notes/rn-extensions/rn-reactor/README.md) * [Major Releases](release-notes/rn-extensions/rn-reactor/rn-reactor-major-releases.md) * [Minor Releases](release-notes/rn-extensions/rn-reactor/rn-reactor-minor-releases.md) From c9e273a438b4bcd2514db283de4d4a12824bdb6c Mon Sep 17 00:00:00 2001 From: Marc Date: Wed, 26 Oct 2022 12:02:01 +0200 Subject: [PATCH 06/24] add AxonServer SE 4.6.5 --- release-notes/rn-axon-server/rn-asse-minor-releases.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/release-notes/rn-axon-server/rn-asse-minor-releases.md b/release-notes/rn-axon-server/rn-asse-minor-releases.md index 840d7ecb..0bba2968 100644 --- a/release-notes/rn-axon-server/rn-asse-minor-releases.md +++ b/release-notes/rn-axon-server/rn-asse-minor-releases.md @@ -4,6 +4,13 @@ This page provides a dedicated overview of patch releases for the Axon Server (S ## Release 4.6 +### Release 4.6.5 + +* Fix: update flow control library +* Fix: change health status for commands to only show warning when there are queued messages and no permits +* Updated audit logging for authentication failures + + ### Release 4.6.4 * Fix: change column name in event processor overview to "Active Segments" From 94b6cc0dd69347ca6fb7d55c8728aa8e4d3dbdd2 Mon Sep 17 00:00:00 2001 From: Marc Date: Wed, 26 Oct 2022 14:28:52 +0200 Subject: [PATCH 07/24] add AxonServer EE 4.6.5 --- release-notes/rn-axon-server/rn-as-minor-releases.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/release-notes/rn-axon-server/rn-as-minor-releases.md b/release-notes/rn-axon-server/rn-as-minor-releases.md index 5b14439e..2e8e65dd 100644 --- a/release-notes/rn-axon-server/rn-as-minor-releases.md +++ b/release-notes/rn-axon-server/rn-as-minor-releases.md @@ -4,6 +4,15 @@ This page provides a dedicated overview of patch releases for the Axon Server (E ## Release 4.6 +### Release 4.6.5 + +* OAuth extension (4.6.1) now also supports OIDC authentication +* Fix: deserialization of forwarded authentication fails and prints stacktrace in log file +* Fix: updated version of LDAP extension (4.6.1) to include fixes from version 4.5.2 +* Fix: update flow control library version to 1.1 +* Fix: change health status for commands to only show warning when there are queued messages and no permits +* Updated audit logging for authentication failures + ### Release 4.6.4 * Fix: contexts not shown in CLI when the request is using an application token or system token From 02d3631e76f9b16b3442ad9a4565cf2b5f340edd Mon Sep 17 00:00:00 2001 From: Oliver Libutzki Date: Fri, 28 Oct 2022 05:32:13 +0000 Subject: [PATCH 08/24] Method name fix: usingPooledStreamingProcessors --> usingPooledStreamingEventProcessors (cherry picked from commit 19e4ba77016a8a9b573b0139d6b46a7cf5234943) --- axon-framework/events/event-processors/streaming.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index f00e4863..bd1b280d 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -201,7 +201,7 @@ public class AxonConfig { ### Configuring a Pooled Streaming Processor -Firstly, to specify that every new processors should default to a `PooledStreamingEventProcessor`, you can invoke the `usingPooledStreamingProcessors` method: +Firstly, to specify that every new processors should default to a `PooledStreamingEventProcessor`, you can invoke the `usingPooledStreamingEventProcessors` method: {% tabs %} {% tab title="Axon Configuration API" %} @@ -209,7 +209,7 @@ Firstly, to specify that every new processors should default to a `PooledStreami public class AxonConfig { // ... public void configureProcessorDefault(EventProcessingConfigurer processingConfigurer) { - processingConfigurer.usingPooledStreamingProcessors(); + processingConfigurer.usingPooledStreamingEventProcessors(); } } ``` @@ -222,7 +222,7 @@ public class AxonConfig { // ... @Autowired public void configureProcessorDefault(EventProcessingConfigurer processingConfigurer) { - processingConfigurer.usingPooledStreamingProcessors(); + processingConfigurer.usingPooledStreamingEventProcessors(); } } ``` From 4d9ebe3e5e215329d6998de08a0c91632e2e3f23 Mon Sep 17 00:00:00 2001 From: Oliver Libutzki Date: Fri, 28 Oct 2022 05:40:39 +0000 Subject: [PATCH 09/24] Renamed deprecated method: workerExecutorService -> workerExecutor (cherry picked from commit 84913ee2e5a0f89b4c57fc5c0f96cf5d870783b5) --- axon-framework/events/event-processors/streaming.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index bd1b280d..813ced29 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -1037,7 +1037,7 @@ public class AxonConfig { EventProcessingConfigurer.PooledStreamingProcessorConfiguration psepConfig = (config, builder) -> builder.coordinatorExecutor(coordinatorExecutorBuilder) - .workerExecutorService(workerExecutorBuilder) + .workerExecutor(workerExecutorBuilder) .initialSegmentCount(32); processingConfigurer.registerPooledStreamingEventProcessorConfiguration("my-processor", psepConfig); @@ -1062,7 +1062,7 @@ public class AxonConfig { EventProcessingConfigurer.PooledStreamingProcessorConfiguration psepConfig = (config, builder) -> builder.coordinatorExecutor(coordinatorExecutorBuilder) - .workerExecutorService(workerExecutorBuilder) + .workerExecutor(workerExecutorBuilder) .initialSegmentCount(32); processingConfigurer.registerPooledStreamingEventProcessorConfiguration("my-processor", psepConfig); From c3c74df4bc2fe2ff4a4d9f929db761d24ab83638 Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Tue, 1 Nov 2022 15:48:03 +0100 Subject: [PATCH 10/24] Append RevisionSnapshotFilter description to FilteringSnapshotEvents Append RevisionSnapshotFilter description to the Filtering Snapshot Events section. This should further clarify that all a user has to do to enable revision-based snapshot filtering, is add the @Revision annotation. #enhancement/revision-snapshot-filter --- axon-framework/tuning/event-snapshots.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/axon-framework/tuning/event-snapshots.md b/axon-framework/tuning/event-snapshots.md index 97753971..f49faf36 100644 --- a/axon-framework/tuning/event-snapshots.md +++ b/axon-framework/tuning/event-snapshots.md @@ -109,7 +109,6 @@ You could take the stance of dropping all the snapshots which are stored (for a It is also possible to filter out snapshot events when reading your Aggregate from the event store. To that end, a `SnapshotFilter` can be defined per Aggregate type or for the entire `EventStore`. - The `SnapshotFilter` is a functional interface, providing two main operations: `allow(DomainEventData Date: Tue, 1 Nov 2022 15:56:44 +0100 Subject: [PATCH 11/24] Add a notice stating why Sagas do not support the DLQ Add a notice stating why Sagas do not support the DLQ. #enhancement/saga-dlq-notice --- axon-framework/events/event-processors/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/axon-framework/events/event-processors/README.md b/axon-framework/events/event-processors/README.md index a08a3100..3b120e54 100644 --- a/axon-framework/events/event-processors/README.md +++ b/axon-framework/events/event-processors/README.md @@ -277,6 +277,15 @@ To that end, the supported dead-letter queue is a so-called `SequencedDeadLetter Integral to its design is to allow for queueing failed events and events that belong to a faulty sequence. It does so by maintaining a sequence identifier for each event, determined by the [sequencing policy](/axon-framework/events/event-processors/streaming.md#sequential-processing). +> **Is there support for Sagas?** +> +> Currently, there is *no* support for using a dead-letter queue for [sagas](/axon-framework/sagas/README.md). +> We've taken this decision as we cannot support a sequenced dead lettering approach as we do for regular event handling. +> +> Furthermore, we cannot do this, as a saga's associations can vary widely between events. +> Due to this, the sequence of events may change, breaking this level of support. +> Hence, there's no way of knowing whether a next event in the stream does or does not belong to a saga. + Note that you *cannot* share a dead-letter queue between different processing groups. Hence, each processing group you want to enable this behavior for should receive a unique dead-letter queue instance. From 04a1621491678f6d3e840432030e109f19d06476 Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Wed, 2 Nov 2022 11:52:47 +0100 Subject: [PATCH 12/24] Introduce a dedicated token stealing section Introduce a dedicated token stealing section onto to the Streaming Processor page. The intent is to guide users further in what token stealing is, why it happens, when it happens, and what the consequence may be to them. #288 --- .../events/event-processors/streaming.md | 77 ++++++++++++++++++- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index 813ced29..8ba24874 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -377,13 +377,13 @@ To be able to reopen the stream at a later point, we should keep the progress so The progress is kept by updating and saving the `TrackingToken` after handling batches of events. Keeping the progress requires CRUD operation, for which the Streaming Processor uses the [`TokenStore`](#token-store). -For a Streaming Processor to process any events, it needs "a claim" on a `TrackingToken`. +For a Streaming Processor to process any events, it needs ["a claim"](#token-claims) on a `TrackingToken`. The processor will update this claim every time it has finished handling a batch of events. This so-called "claim extension" is, just as updating and saving of tokens, delegated to the Token Store. Hence, the Streaming Processors achieves collaboration among instances/threads through token claims. In the absence of a claim, a processor will actively try to retrieve one. -If a token claim is not extended for a configurable time window, other processor threads are able to "steal" the claim. +If a token claim is not extended for a configurable time window, other processor threads are able to ["steal"](#token-stealing) the claim. Token stealing can, for example, happen if event processing is slow or encountered some exceptions. ### Initial Tracking Token @@ -419,7 +419,7 @@ In those cases, we recommend to validate if any of the above situations occurred There are a couple of things we can configure when it comes to tokens. We can separate these options in "initial token" and "token claim" configuration, as described in the following sections: -**Initial Token** +#### Initial Token The [initial token](#initial-tracking-token) for a `StreamingEventProcessor` is configurable for every processor instance. When configuring the initial token builder function, the received input parameter is the `StreamableMessageSource`. @@ -501,7 +501,7 @@ public class AxonConfig { {% endtab %} {% endtabs %} -**Token Claims** +#### Token Claims As described [here](#tracking-tokens), a streaming processor should claim a token before it is allowed to perform any processing work. There are several scenarios where a processor may keep the claim for too long. @@ -587,6 +587,75 @@ public class AxonConfig { {% endtab %} {% endtabs %} +#### Token Stealing + +As described at the [start](#tracking-tokens), streaming processor threads can "steal" tokens from one another. +You may regard a token as stolen when a thread loses a [token claim](#token-claims). +Situations like this internally result in an `UnableToClaimTokenException`, caught by both streaming event processor implementations and translated into warn- or info-level log statements. + +Where the framework uses token claims to ensure that a single thread is processing a sequence of events, it supports token stealing to ascertain event processing is not blocked forever. +In short, the framework uses token stealing to unblock your streaming processor threads when processing takes too long. +Examples may include literal slow processing, blocking exceptional scenarios, and deadlocks. + +However, token stealing may occur as a surprise for some applications, making it an unwanted side effect. +As such, it is good to be aware of why tokens get stolen (as described above), but also when this happens and what the consequences are. + +##### When is a Token stolen? + +In practical terms, a token is stolen whenever the _claim timeout_ is exceeded. + +This timeout is met whenever the token's timestamp (e.g., the `timestamp` column of your `token_entry` table) exceeds the `claimTimeout` of the `TokenStore`. +By default, the `claimTimeout` value equals 10 seconds. +To adjust it, you must configure a `TokenStore` instance through its builder, as exemplified in the [Token Store](#token-store) section. + +The token's timestamp is equally crucial in deciding when the timeout is met. +The streaming processor thread holding the claim is in charge of updating the token timestamp. +This timestamp is updated whenever the thread finishes a batch of events or whenever the processor extends the claim. +When to extend a claim differs between the Tracking and Pooled Streaming processor. +You should check out the [token claim](#token-claims) section if you want to know how to configure these values. + +To further clarify, a streaming processor's thread needs to be able to update the token claim and, by extension, the timestamp to ensure it won't get stolen. +Hence, a staling processor thread will, one way or another, eventually lose the claim. + +Examples of when a thread may get its token stolen are: +- Overall slow event handling +- To large event batch size +- Blocking operations inside event handlers +- Blocking exceptions inside event handlers + +##### What are the consequences of Token stealing? + +The consequence of token stealing is that an event may be handled twice (or more). + +When a thread steals a token, the original thread was _already_ processing events from the token's position. +To protect against doubling event handling, Axon Framework will combine committing the event handling task with updating the token. +As the token claim is required to update the token, the original thread will fail the update. +Following this, a rollback occurs on the [Unit of Work](), resolving most issues arising from token stealing. + +The ability to rollback event handling tasks sheds light on the consequences of token stealing. +Most event processors project events into a projection stored within a database. +Furthermore, if you store the projection in the same database as the token, the rollback will ensure the change is not persisted. +Thus, the consequence of token stealing is limited to wasting processor cycles. +This scenario is why we recommend storing tokens and projections in the same database. + +If a rollback is out of the question for an event handling task, we strongly recommend making the task idempotent. +You may have this scenario when, for example, the projection and tokens do not reside in the same database. +Or when the event handler dispatches an operation (e.g., through the `CommandGateway`). +In making the invoked operation idempotent, you ensure that whenever the thread stealing a token handles an event twice (or more), the outcome will be identical. + +Without idempotency, the consequences of token stealing can be manyfold: +- Your projection (stored in a different database than your tokens!) may incorrectly project the state. +- An event handler putting messages on a queue will put a message on the queue again. +- A Saga Event Handler dispatching a command will dispatch that command again. +- An event handler sending an email will send that email again. + +In short, any operation introducing a side effect that isn't handled in an idempotent fashion will occur again when a token is stolen. + +Concluding, we can separate the consequence of token stealing into roughly three scenarios: +1. We can rollback the operation. In this case, the only consequence is wasted processor cycles. +2. The operation is idempotent. In this case, the only consequence is wasted processor cycles. +3. When the task cannot be rolled back nor performed in an idempotent fashion, compensating actions may be the way out. + ### Token Store The `TokenStore` provides the CRUD operations for the `StreamingEventProcessor` to interact with `TrackingTokens`. From df960a19082964e9013cea08d3bd564c344f0f59 Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Wed, 2 Nov 2022 11:53:43 +0100 Subject: [PATCH 13/24] Add missing link to UnitOfWork Add missing link to UnitOfWork #288 --- axon-framework/events/event-processors/streaming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index 8ba24874..1d190fc8 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -630,7 +630,7 @@ The consequence of token stealing is that an event may be handled twice (or more When a thread steals a token, the original thread was _already_ processing events from the token's position. To protect against doubling event handling, Axon Framework will combine committing the event handling task with updating the token. As the token claim is required to update the token, the original thread will fail the update. -Following this, a rollback occurs on the [Unit of Work](), resolving most issues arising from token stealing. +Following this, a rollback occurs on the [Unit of Work](/axon-framework/messaging-concepts/unit-of-work.md), resolving most issues arising from token stealing. The ability to rollback event handling tasks sheds light on the consequences of token stealing. Most event processors project events into a projection stored within a database. From d4c6d920ee9b9f7e732910f1cf6b97bf5aedf9fc Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Wed, 2 Nov 2022 12:18:28 +0100 Subject: [PATCH 14/24] Replace command sample for third-party service Replace command sample for third-party service, as command dispatching would only occur again in a distributed scenario. Although defining this wouldn't be off, it's out of the scope of the intent of the enumartion. #288 --- axon-framework/events/event-processors/streaming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index 1d190fc8..3044003d 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -646,7 +646,7 @@ In making the invoked operation idempotent, you ensure that whenever the thread Without idempotency, the consequences of token stealing can be manyfold: - Your projection (stored in a different database than your tokens!) may incorrectly project the state. - An event handler putting messages on a queue will put a message on the queue again. -- A Saga Event Handler dispatching a command will dispatch that command again. +- A Saga Event Handler invoking a third-party service will invoke that service again. - An event handler sending an email will send that email again. In short, any operation introducing a side effect that isn't handled in an idempotent fashion will occur again when a token is stolen. From 4f4d063b2697c2cc65d109d71813061305dacb87 Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Fri, 4 Nov 2022 10:45:28 +0100 Subject: [PATCH 15/24] Update axon-framework/tuning/event-snapshots.md Co-authored-by: Sara Torrey --- axon-framework/tuning/event-snapshots.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axon-framework/tuning/event-snapshots.md b/axon-framework/tuning/event-snapshots.md index f49faf36..8d20ca5a 100644 --- a/axon-framework/tuning/event-snapshots.md +++ b/axon-framework/tuning/event-snapshots.md @@ -153,7 +153,7 @@ When this is not required, you can base yourself on the default `SnapshotFilter` To configure this `SnapshotFilter`, all you have to do is use the `@Revision` annotation on your Aggregate class. In doing so, the `RevisionSnapshotFilter` is set, filtering non-matching snapshots from the `Repository`'s loading process, based on the value maintained within the `@Revision` annotation. -Through this, with every new production deployment of your application that adjusts the Aggregate state, you only have to adjust the revision value in the annotation. +Through this, with every new production deployment of your application that adjusts the Aggregate state, you would only have to adjust the revision value in the annotation. Check out the following example for how to set this up: ```java From a23f0806ae930bec8eec1fbe5b4ac0a2d75ebcbc Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Fri, 4 Nov 2022 10:46:14 +0100 Subject: [PATCH 16/24] Update axon-framework/events/event-processors/streaming.md Co-authored-by: Sara Torrey --- axon-framework/events/event-processors/streaming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index 3044003d..f6c8215e 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -383,7 +383,7 @@ This so-called "claim extension" is, just as updating and saving of tokens, dele Hence, the Streaming Processors achieves collaboration among instances/threads through token claims. In the absence of a claim, a processor will actively try to retrieve one. -If a token claim is not extended for a configurable time window, other processor threads are able to ["steal"](#token-stealing) the claim. +If a token claim is not extended for a configurable amount of time, other processor threads can ["steal"](#token-stealing) the claim. Token stealing can, for example, happen if event processing is slow or encountered some exceptions. ### Initial Tracking Token From 434f6a69f6c14a5be2b336e05efcd504f80a96ff Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Fri, 4 Nov 2022 10:46:29 +0100 Subject: [PATCH 17/24] Update axon-framework/events/event-processors/streaming.md Co-authored-by: Sara Torrey --- axon-framework/events/event-processors/streaming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index f6c8215e..88959dc4 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -590,7 +590,7 @@ public class AxonConfig { #### Token Stealing As described at the [start](#tracking-tokens), streaming processor threads can "steal" tokens from one another. -You may regard a token as stolen when a thread loses a [token claim](#token-claims). +A token is "stolen" when a thread loses a [token claim](#token-claims). Situations like this internally result in an `UnableToClaimTokenException`, caught by both streaming event processor implementations and translated into warn- or info-level log statements. Where the framework uses token claims to ensure that a single thread is processing a sequence of events, it supports token stealing to ascertain event processing is not blocked forever. From 77cd95c7df6d5ac65fbc418d5e9aee97501757fc Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Fri, 4 Nov 2022 10:47:35 +0100 Subject: [PATCH 18/24] Update axon-framework/events/event-processors/streaming.md Co-authored-by: Sara Torrey --- axon-framework/events/event-processors/streaming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index 88959dc4..090d4644 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -591,7 +591,7 @@ public class AxonConfig { As described at the [start](#tracking-tokens), streaming processor threads can "steal" tokens from one another. A token is "stolen" when a thread loses a [token claim](#token-claims). -Situations like this internally result in an `UnableToClaimTokenException`, caught by both streaming event processor implementations and translated into warn- or info-level log statements. +Situations like this internally result in an `UnableToClaimTokenException,` caught by both streaming event processor implementations and translated into warn- or info-level log statements. Where the framework uses token claims to ensure that a single thread is processing a sequence of events, it supports token stealing to ascertain event processing is not blocked forever. In short, the framework uses token stealing to unblock your streaming processor threads when processing takes too long. From afc1f3c861a8f7ced090ec85cff34b14bcf2485a Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Fri, 4 Nov 2022 10:47:44 +0100 Subject: [PATCH 19/24] Update axon-framework/events/event-processors/streaming.md Co-authored-by: Sara Torrey --- axon-framework/events/event-processors/streaming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index 090d4644..4de6a9f4 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -606,7 +606,7 @@ In practical terms, a token is stolen whenever the _claim timeout_ is exceeded. This timeout is met whenever the token's timestamp (e.g., the `timestamp` column of your `token_entry` table) exceeds the `claimTimeout` of the `TokenStore`. By default, the `claimTimeout` value equals 10 seconds. -To adjust it, you must configure a `TokenStore` instance through its builder, as exemplified in the [Token Store](#token-store) section. +To adjust it, you must configure a `TokenStore` instance through its builder, as shown in the [Token Store](#token-store) section. The token's timestamp is equally crucial in deciding when the timeout is met. The streaming processor thread holding the claim is in charge of updating the token timestamp. From e93e7764e8cb287eb0fef3cf71c144c27388edc7 Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Fri, 4 Nov 2022 10:48:11 +0100 Subject: [PATCH 20/24] Update axon-framework/events/event-processors/streaming.md Co-authored-by: Sara Torrey --- axon-framework/events/event-processors/streaming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index 4de6a9f4..3e1859a2 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -619,7 +619,7 @@ Hence, a staling processor thread will, one way or another, eventually lose the Examples of when a thread may get its token stolen are: - Overall slow event handling -- To large event batch size +- Too large event batch size - Blocking operations inside event handlers - Blocking exceptions inside event handlers From c3f78b1dee2f8ce445d655201c8a0211e0ee5b3f Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Fri, 4 Nov 2022 10:48:26 +0100 Subject: [PATCH 21/24] Update axon-framework/events/event-processors/streaming.md Co-authored-by: Sara Torrey --- axon-framework/events/event-processors/streaming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index 3e1859a2..edc3eb87 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -640,7 +640,7 @@ This scenario is why we recommend storing tokens and projections in the same dat If a rollback is out of the question for an event handling task, we strongly recommend making the task idempotent. You may have this scenario when, for example, the projection and tokens do not reside in the same database. -Or when the event handler dispatches an operation (e.g., through the `CommandGateway`). + or when the event handler dispatches an operation (e.g., through the `CommandGateway`). In making the invoked operation idempotent, you ensure that whenever the thread stealing a token handles an event twice (or more), the outcome will be identical. Without idempotency, the consequences of token stealing can be manyfold: From a34f4d682c5eb398a030d89cf9e209fbb4f88128 Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Fri, 4 Nov 2022 13:07:29 +0100 Subject: [PATCH 22/24] Replace ascertain for guarantee Replace ascertain for guarantee for simplicity in language use. #288 --- axon-framework/events/event-processors/streaming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axon-framework/events/event-processors/streaming.md b/axon-framework/events/event-processors/streaming.md index edc3eb87..b35a1641 100644 --- a/axon-framework/events/event-processors/streaming.md +++ b/axon-framework/events/event-processors/streaming.md @@ -593,7 +593,7 @@ As described at the [start](#tracking-tokens), streaming processor threads can " A token is "stolen" when a thread loses a [token claim](#token-claims). Situations like this internally result in an `UnableToClaimTokenException,` caught by both streaming event processor implementations and translated into warn- or info-level log statements. -Where the framework uses token claims to ensure that a single thread is processing a sequence of events, it supports token stealing to ascertain event processing is not blocked forever. +Where the framework uses token claims to ensure that a single thread is processing a sequence of events, it supports token stealing to guarantee event processing is not blocked forever. In short, the framework uses token stealing to unblock your streaming processor threads when processing takes too long. Examples may include literal slow processing, blocking exceptional scenarios, and deadlocks. From fe6f730b8497cb8912d1cb50d8e267b37d60234e Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Fri, 4 Nov 2022 13:09:26 +0100 Subject: [PATCH 23/24] Add 4.6.2 release notes Add 4.6.2 release notes --- .../rn-multi-tenancy-minor-releases.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/release-notes/rn-extensions/rn-multi-tenancy/rn-multi-tenancy-minor-releases.md b/release-notes/rn-extensions/rn-multi-tenancy/rn-multi-tenancy-minor-releases.md index ba0701a6..29e62be2 100644 --- a/release-notes/rn-extensions/rn-multi-tenancy/rn-multi-tenancy-minor-releases.md +++ b/release-notes/rn-extensions/rn-multi-tenancy/rn-multi-tenancy-minor-releases.md @@ -4,6 +4,23 @@ This page notes all enhancements and features that we have introduced to our maj ## Release 4.6 +### Release 4.6.2 + +#### Bug Fixes + +- Resolve tenant outside UoW [#39](https://github.com/AxonFramework/extension-multitenancy/pull/39) + +#### Dependency Upgrade + +- Bump mockito.version from 4.8.0 to 4.8.1 [#38](https://github.com/AxonFramework/extension-multitenancy/pull/38) +- Bump spring.boot.version from 2.7.4 to 2.7.5 [#37](https://github.com/AxonFramework/extension-multitenancy/pull/37) + +#### Contributors + +We'd like to thank all the contributors who worked on this release! + +- [@schananas](https://github.com/schananas) + ### Release 4.6.1 #### Bug Fixes From b4d7c165f31091a8384ed6b3a25f64d63b43b484 Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Tue, 8 Nov 2022 11:08:36 +0100 Subject: [PATCH 24/24] Fine tune code samples for DLQ configuration Fine tune code samples for DLQ configuration #287 --- .../events/event-processors/README.md | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/axon-framework/events/event-processors/README.md b/axon-framework/events/event-processors/README.md index 824740f1..367d709e 100644 --- a/axon-framework/events/event-processors/README.md +++ b/axon-framework/events/event-processors/README.md @@ -314,21 +314,20 @@ A `JpaSequencedDeadLetterQueue` configuration example: {% tabs %} {% tab title="Axon Configuration API" %} ```java -public class DeadLetterQueueExampleConfig { - - public ConfigurerModule configureDeadLetterQueueFor(EventProcessingConfigurer configurer) { - return configurer -> configurer.eventProcessing( - eventProcessingConfigurer -> eventProcessingConfigurer.registerDeadLetterQueue( - "MyProcessingGroup", - configuration -> JpaSequencedDeadLetterQueue.builder() - .processingGroup("MyProcessingGroup") - .maxSequences(256) - .maxSequenceSize(256) - .entityManagerProvider(configuration.getComponent(EntityManagerProvider.class)) - .transactionManager(configuration.getComponent(TransactionManager.class)) - .serializer(configuration.serializer()) - .build() - ) +public class AxonConfig { + // ... + public void configureDeadLetterQueue(EventProcessingConfigurer processingConfigurer) { + // Replace "my-processing-group" for the processing group you want to configure the DLQ on. + processingConfigurer.registerDeadLetterQueue( + "my-processing-group", + config -> JpaSequencedDeadLetterQueue.builder() + .processingGroup("my-processing-group") + .maxSequences(256) + .maxSequenceSize(256) + .entityManagerProvider(config.getComponent(EntityManagerProvider.class)) + .transactionManager(config.getComponent(TransactionManager.class)) + .serializer(config.serializer()) + .build() ); } } @@ -337,22 +336,21 @@ public class DeadLetterQueueExampleConfig { {% tab title="Spring Boot AutoConfiguration" %} ```java @Configuration -public class DeadLetterQueueExampleConfig { - - @Autowired - public ConfigurerModule configureDeadLetterQueueFor(EventProcessingConfigurer configurer) { - return configurer -> configurer.eventProcessing( - eventProcessingConfigurer -> eventProcessingConfigurer.registerDeadLetterQueue( - "MyProcessingGroup", - configuration -> JpaSequencedDeadLetterQueue.builder() - .processingGroup("MyProcessingGroup") - .maxSequences(256) - .maxSequenceSize(256) - .entityManagerProvider(configuration.getComponent(EntityManagerProvider.class)) - .transactionManager(configuration.getComponent(TransactionManager.class)) - .serializer(configuration.serializer()) - .build() - ) +public class AxonConfig { + // ... + @Bean + public ConfigurerModule deadLetterQueueConfigurerModule() { + // Replace "my-processing-group" for the processing group you want to configure the DLQ on. + return configurer -> configurer.eventProcessing().registerDeadLetterQueue( + "my-processing-group", + config -> JpaSequencedDeadLetterQueue.builder() + .processingGroup("my-processing-group") + .maxSequences(256) + .maxSequenceSize(256) + .entityManagerProvider(config.getComponent(EntityManagerProvider.class)) + .transactionManager(config.getComponent(TransactionManager.class)) + .serializer(config.serializer()) + .build() ); } } @@ -514,10 +512,11 @@ See the following example for configuring our custom policy: {% tabs %} {% tab title="Axon Configuration API" %} ```java -public class EnqueuePolicyConfigurer { - +public class AxonConfig { + // ... public void configureEnqueuePolicy(EventProcessingConfigurer configurer) { - configurer.registerDeadLetterPolicy("MyProcessingGroup", config -> new MyEnqueuePolicy()); + // Replace "my-processing-group" for the processing group you want to configure the policy on. + configurer.registerDeadLetterPolicy("my-processing-group", config -> new MyEnqueuePolicy()); } } ``` @@ -525,12 +524,13 @@ public class EnqueuePolicyConfigurer { {% tab title="Spring Boot AutoConfiguration" %} ```java @Configuration -public class EnqueuePolicyConfigurer { +public class AxonConfig { @Bean - public ConfigurerModule configureEnqueuePolicy(EventProcessingConfigurer configurer) { + public ConfigurerModule enqueuePolicyConfigurerModule() { + // Replace "my-processing-group" for the processing group you want to configure the policy on. return configurer -> configurer.eventProcessing() - .registerDeadLetterPolicy("MyProcessingGroup", config -> new MyEnqueuePolicy()); + .registerDeadLetterPolicy("my-processing-group", config -> new MyEnqueuePolicy()); } } ```