Allard,
Thanks for your input, and for the hints towards manually setting up
an AnnotationEventListenerBeanPostProcessor, probably directly towards
a SpringIntegrationEventBus since we are already using spring
integration towards rabbit.
However, manually setting an AnnotationEventListenerBeanPostProcessor
for every event handling class seems almost as cumbersome as manually
creating the necessary spring integration config to route the events
to the necessary listeners although you do get the filter for free...
For now I think we will go for just using spring integration between a
rabbit queue containing all events, unwrapped from
GenericEventMessage, and the @ServiceActivator annotation which seems
to give just about the same functionality with the amount of config I
desired (a rabbit q, a spring integration channel and annotated event
handling methods) without forcing us to depend an axon in the
applications that don't really make use of the whole cqrs
infrastructure.
Moving a query side updating listener out of the axon command handling
app will not be as seamless but doing a one time job of replacing
@EventListener to @ServiceActivator is probably something you can live
with.
Thanks again for the feedback and a great framework!
Cheers
On Apr 30, 6:48 pm, Allard Buijze <
bui...@gmail.com> wrote:
> Hi Sebastian,
>
> you're right. It should work. It should only complain if there are actually command handlers found in the spring context.
>
> The solution in your case, you could just configure a bean of type (if I recall correctly, don't have the source code at hand) AnnotationEventHandlerBeanPostProcessor.
>
> Meanwhile, I'll work on getting the namespace support working for this case. In the end, there is nothing wrong with working this way. Axon isn't the solution for every application...
>
> Cheers,
>
> Allard
>