Class MessageStreamResolverUtils

java.lang.Object
org.axonframework.messaging.core.annotation.MessageStreamResolverUtils

@Internal public class MessageStreamResolverUtils extends Object
Utility class that can resolve the result of any MessageHandler into the expected corresponding MessageStream.

This utility class currently has a major drawback, which is that it only takes the "top level" type into account. Differently put, if we receive a Mono<Message> as the given result of resolveToStream(Object, MessageTypeResolver), we will push that Message through the given typeResolver and make it the Message.payload(). Similarly, if we receive a CompletableFuture<List<Object>> (or CompletableFuture<List<Message>> for that matter), we will return a MessageStream.Single, while we are actually dealing with a MessageStream.

These are known limitation that will be supported in due time.

Since:
5.0.0
Author:
Simon Zambrovski, Steven van Beelen