Store events in eventstore without aggregate

Hello,

Is there a way to store events that do not belong to any aggregate?
For example, if you send a message from legacy code : GenericEventMessage.asEventMessage(Object)

Kind regards,
Koen

Hi Koen,

that’s what Axon 3 now does by default. All messages sent are stored (when using an Event Store). You can add an EventBus as parameter to your @CommandHandler and directly send messages to it. Axon will ensure the timing of apply()-ed versus eventbus.publish()-ed events is correct.

Cheers,

Allard