Class AnnotationMessageTypeResolver

java.lang.Object
org.axonframework.messaging.core.annotation.AnnotationMessageTypeResolver
All Implemented Interfaces:
MessageTypeResolver

public class AnnotationMessageTypeResolver extends Object implements MessageTypeResolver
A MessageTypeResolver implementation looking for configurable annotations on the Class this resolver is invoked for.

This resolver can use unique annotations per attribute. The attributes searched for are the namespace, name, and version, reflecting the QualifiedName.namespace(), QualifiedName.localName(), and MessageType.version(). The default annotation for the name and version is the Message annotation, from which the name and Message.version() attributes will be used respectively. The namespace attribute is determined by the Namespace annotation instead. The Message annotation is meta-annotated with the namespace annotation as a fallback.

Allows for defining a fallback MessageTypeResolver, for when the defined annotations are not present.

Since:
5.0.0
Author:
Steven van Beelen