[axonframework] Aggregate Root Event Ordering

Hi Carlyle,

the answer is no ;-). Axon will only guarantee that the order in which an aggregate produces events, is also the order in which they are published. The actual transportation system you use is responsible for ensuring messages are delivered in the order they were published. The SimpleCommandBus handles events immediately, so order is guaranteed. If you use AMQP or JMS, you should also be ok, since most brokers will have that behavior (as long as message processing doesn’t fail).

Otherwise, each event will always contain a sequence number. Worst case, you could use that sequence number to re-order messages on the recieving side. Before you spend time building that, check your message broker’s documentation on message order guarantees.

Cheers,

Allard