IdentifierFactory
to generate all identifiers, whether they are for events, commands or queries. The default IdentifierFactory
uses randomly generated java.util.UUID
based identifiers. Although they are very safe to use, the process to generate them does not excel in performance.IdentifierFactory
is an abstract factory that uses Java's ServiceLoader
(since Java 6) mechanism to find the implementation to use. This means you can create your own implementation of the factory and put the name of the implementation in a file called /META-INF/services/org.axonframework.common.IdentifierFactory
. Java's ServiceLoader
mechanism will detect that file and attempt to create an instance of the class named inside.IdentifierFactory
. The implementation must:/META-INF/services/org.axonframework.common.IdentifierFactory
file on the classpath,IdentifierFactory
,IdentifierFactory
class, and must