I stumbled upon a problem regarding the order of event upcasters in a Spring configured Axon application.
As far as I understood using Spring
@Order annotation can be used to configure the event upcasters’ order. To quote @allardbz (Source: EventUpcaster for EventStore using Axon Server - #3 by allardbz):
if you’re on Spring Boot, you can just define your upcasters in your application context. Use Spring’s @Order to make sure they are put into a chain in the right order.
This seems not to work as expected as
org.springframework.beans.factory.ListableBeanFactory.getBeanNamesForType(Class<?>) to get the bean names of type
EventUpcaster. This method does not take the
@Order annotation into account. To quote the Javadoc:
Bean names returned by this method should always return bean names in the order of definition in the backend configuration, as far as possible.
To me it looks like that it’s not possible to use
@Order to configure the event upcaster precedence. Do I miss anything or do I have another chance to register the upcasters in a certain order?